Text cleaner, line sorter, deduplicator and slug generator
Trim and collapse whitespace, change sentence, title or programming case, choose LF or CRLF line endings, sort, deduplicate or reverse lines, and create Unicode or ASCII web slugs and identifiers.
FluffyShieldProtected workspace
From
To
Loading the tool…
The tool didn't load. Reload the page, or check whether an extension or network filter blocks .
Free · No upload · No sign-up · No usage quotas
How it works
Choose From and To
→Paste text into Input
→Compare the Result with your original
→Copy or download the result
What it does
Spacing
Trim the edges of a passage, or shrink every gap between words to one space.
Lists
Sort lines with numbers in order, drop exact or loose repeats, or do both at once.
Case and labels
Change capitalization, or turn a title into a web-address slug or a name for code.
Limits One change at a time; your original stays in Input.
Extra gaps, repeated lines, or a title that needs to be a web address?
FluffyBench's Text cleaner gives each of those its own choice under To. Paste your text, and the cleaned copy appears next to your original.
Each choice changes one kind of thing, so you can see exactly what it did before you copy the result.
FluffyBench · 6 min read · Measured with this tool
Which spacing fix does your text need?
Picture your pasted text as a page with a margin. Trimmed text cuts the margin: spaces, tabs and empty lines at the very start and very end of the whole passage go, and nothing inside it moves. Collapsed spaces works between the words instead: every run of spaces or tabs becomes one space, everywhere, and every line break stays.
Here's one pasted note cleaned both ways, with every blank made visible.
Trim only touches the outside of the whole passage, so the indent before “Bring” survives. Collapse fixes every gap but keeps every line break, even the empty first line. How we measured
Cleaning up spacing in FluffyBench
Here's the whole job on a phone, from picking Collapsed spaces to copying the result. Every other choice under To works the same way.
Tap To and choose Collapsed spaces. Each choice changes one thing, so pick the one that matches what's wrong.
From stays on Text for spacing, case and labels. Switch it to Lines only when you're tidying a list.
Paste your text into Input; the Input tab keeps your original. The result is ready as soon as you paste; there's no button to press.
Open Result and compare it with your original: one space per gap, both lines still there, and a count that drops as gaps shrink. If the wrong thing changed, pick another To; your text stays in Input.
Copy puts the cleaned text on your clipboard; Download saves it as a text file.
How do you sort a list or remove repeated lines?
Switch From to Lines, and the tool treats each line as one item. Unique lines drops later exact copies of a line and keeps your order. Remove duplicate lines (ignore case and end spaces) also ignores letter case and spaces or tabs at the ends, and keeps the first spelling. Sorted A → Z and Sorted Z → A reorder the whole list and keep repeats; a run of digits is compared as a number, so item 9 comes before item 10. Unique + sorted does both, and Reversed lines flips the order without sorting.
Here's one short list under the three main choices.
Your list
Unique lines
Sorted A → Z
Unique + sorted
Unique lines keeps the first copy and your order; sorting can scramble a list whose order matters, like recipe steps. Sorting uses your browser's text order, with a run of digits compared as a number, and doesn't trim lines first.
Lines must match exactly to count as repeats.
Your list
Unique lines
Nothing is removed: a capital letter or a trailing space (·) makes a line different.
Here's the same job in the tool, with a guest list that has one name twice.
Tap From and choose Lines, so each line counts as one item.
Then tap To and pick what should happen to the list. Choose Unique + sorted for both.
Paste the list into Input, then open Result. The second Marco is gone and the names are in A-to-Z order.
How do you change capitalization?
Lowercase and Uppercase change every letter. Capitalized words lowers everything first, then gives each run of letters a capital, so it can't tell an apostrophe or a name like McDonald from any other word.
Sentence case lowers everything, then capitalizes the first letter of each sentence and each paragraph. Names and the word I stay lowercase, so check those by hand. Title Case capitalizes each word but leaves small words like and, of and the in lowercase mid-title, and keeps an acronym such as NASA as you typed it.
The programming styles work line by line. Each line is split into words at spaces, punctuation and changes of case, then joined the chosen way, so user name becomes userName in camelCase, UserName in PascalCase, user_name in snake_case, user-name in kebab-case and USER_NAME in CONSTANT_CASE.
Here's one phrase under the first three case choices.
Check names and words with apostrophes before you copy a Capitalized words result.
How do you turn a title into a web-address slug?
A slug is the short lowercase label at the end of a web address, like text-cleaner in this page's own address. Unicode slug keeps accented letters and other scripts and joins the words with hyphens. ASCII slug folds accents to plain letters and drops other scripts, giving the usual web slug. ASCII identifier makes a name for code out of plain letters, digits and underscores.
Here's the tool's own Example under the Unicode slug and ASCII identifier choices.
Both drop the punctuation and the spaces at the ends. The Unicode slug keeps the accent and the Chinese characters; the ASCII identifier strips the accent and leaves out the Chinese characters.
What if some spaces or line breaks won't go away?
Some characters only look like spaces. Collapsed spaces matches ordinary spaces and tabs, so a no-break space or a zero-width space, which can come along when you copy from a web page or a document, gets through untouched.
Here's a pasted line with both kinds hiding in it, before and after Collapsed spaces.
Only the purple-shaded blanks change; the two lookalikes come through exactly as they were.
Line breaks follow their own rules. Trimmed text removes empty lines and breaks at the very start and end of the passage, but never the breaks between your lines, and Collapsed spaces keeps every break. Neither one changes the kind of break: LF, the single character Mac and Linux use, or CRLF, the two-character pair from Windows. That's what the two line-ending choices are for.
Here's where the two line-ending choices live, and how to bring in a file without losing its endings.
Line endings have their own two choices under To: LF line endings and CRLF line endings.
Typed or pasted breaks always arrive as LF, and Input marks each break LF. To keep a file's own endings, use Open file instead of pasting.
Not sure which kind a program wants? Our LF and CRLF guide explains when the difference matters.
Counting or comparing text instead?
The Text cleaner changes your text. If you only want to know how long something is, FluffyBench's Text counter counts words, characters and lines without touching it. To see exactly what changed between two versions, like your original and the cleaned copy, paste both into FluffyBench's Text diff.