Text cleaner, line sorter, deduplicator and slug generator
Trim and collapse whitespace, change case, choose LF or CRLF line endings, sort, deduplicate or reverse lines, and create Unicode slugs or ASCII identifiers.
Trim and collapse whitespace, change case, choose LF or CRLF line endings, sort, deduplicate or reverse lines, and create Unicode slugs or ASCII identifiers.
Trim the edges of a passage, or shrink every gap between words to one space.
Sort lines, drop exact repeats, or do both at once.
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.
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.
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.
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.
Switch From to Lines, and the tool treats each line as one item. Unique lines drops later copies of a line and keeps your order. Sorted A → Z and Sorted Z → A reorder the whole list and keep repeats. Unique + sorted does both, and Reversed lines flips the order without sorting.
Here's one short list under the three main choices, plus a list of near-repeats that all survive.
Here's the same job in the tool, with a guest list that has one name twice.
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.
Here's one phrase under all three case choices.
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 identifier makes a name for code out of plain letters, digits and underscores.
Here's the tool's own Example under both label choices.
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.
Our guide to invisible characters shows where they come from and how to track them down.
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.
Not sure which kind a program wants? Our LF and CRLF guide explains when the difference matters.
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.