If you select "Remove empty lines," the option to collapse them will no longer work because all empty lines are removed.
How it works
The text cleaner normalizes content pasted from emails, spreadsheets, logs, or documents, where extra spaces, repeated blank lines, or duplicate entries tend to sneak in. You apply the transformations you need and get a tidy result ready to copy elsewhere.
You can trim the edges of each line, remove or collapse blank lines, remove duplicates, sort ascending or descending, and unify the line breaks to LF or CRLF. It also shows character, word, and line metrics before and after, and everything is processed in your browser.
Use cases
- Clean up a list of domains, emails, or IPs pasted with spaces and blank lines to use it in another tool.
- Remove duplicate entries from a list, keeping only the first occurrence of each one.
- Sort loose lines alphabetically respecting the active language, for example for a list or an index.
- Unify the line endings (LF or CRLF) when moving text between Windows, Linux, and macOS.
Frequently asked questions
What is the difference between removing and collapsing blank lines?
"Remove blank lines" deletes all blank lines and leaves the text compact. "Collapse blank lines" keeps the separation between blocks but reduces several blank lines in a row to a single one, useful to keep paragraphs without excessive spacing.
Does the sorting respect accents and numbers?
Yes. The sorting uses the comparison rules of the active language and treats numbers naturally, so "file2" comes before "file10" and accents are sorted as appropriate for each language.
What is the difference between LF and CRLF?
They are the two ways of marking the end of a line: LF (\n) is the standard on Linux and macOS, and CRLF (\r\n) the usual one on Windows. Unifying them avoids invisible differences when comparing files or processing them with tools that expect a specific format.
When removing duplicates, which line is kept?
The first occurrence of each line is kept and later repetitions are discarded, preserving the original order unless you also enable sorting.