Clean Text
- Paste your text into the input field.
- Pick the whitespace operations you want: collapse repeated spaces, trim each line, trim the whole text, drop empty lines, or convert tabs to spaces.
- Choose how line breaks are handled: keep, remove, replace with a space, or normalise to the Unix or Windows convention.
- Decide whether to strip accents — all of them, or only the common ones.
Cleaning always runs in the same sequence: line breaks first, then whitespace, then accents last.
Normalising line breaks first stops whitespace collapsing from reaching across lines and merging paragraphs that should stay apart.
Stripping accents last preserves character comparison in the earlier stages — any step that relies on identifying words still sees the text with its accents intact.
That fixed order is what makes the result predictable: the same options always produce the same output, regardless of the order you ticked them.
Unix, Linux and macOS end a line with LF. Windows uses CR followed by LF. A file written on one and read on the other shows up as a single long line, or with an invisible character at the end of every line.
Normalising to LF or CRLF fixes the problem at the source, and it is usually the missing step when an imported file fails on a line that looks perfectly fine.
Replacing breaks with a space is the right operation when you need to turn text that was broken into fragments — a paragraph copied out of a PDF, say — back into running prose.
Stripping accents is useful for building identifiers, comparing text while ignoring diacritics, or preparing data for a legacy system that rejects anything outside ASCII.
Do not use it on text meant for readers: in Portuguese and Spanish the accent is part of the spelling, and text without it is simply wrong.
If the goal is a URL, the slug generator does this along with separator substitution.
Frequently asked questions
Most likely the collapse spaces operation was not selected, or what is there are special space characters such as the non-breaking space, which are not ordinary spaces.
Trimming lines removes leading and trailing whitespace from each line individually. Trimming everything removes it only from the start and end of the whole text.
LF is the convention on Unix, Linux, macOS and most development tooling. CRLF is the Windows convention. If the destination is a code repository, LF is almost always right.
In Portuguese and Spanish, yes: accents are part of the spelling and sometimes distinguish words. Use it only when the text is consumed by machines, not people.
No. All cleaning happens in your browser.