How to use
- Paste the messy text into the input box.
- Choose what to clean. Collapsing repeated spaces, trimming lines and fixing invisible characters are on by default.
- Check the result and the count of invisible characters that were fixed.
- Copy the clean text, or press Use result as input to run it through another tool.
Why text gets messy
Copying text between programs rarely produces clean results. PDFs break lines in the middle of sentences and add extra spaces, web pages use non-breaking spaces for layout, chat apps and word processors insert zero-width characters, and justified text may carry double spaces after every full stop. These problems are hard to see but easy to notice later: a search does not find a word that is clearly there, a password field rejects a code you pasted, or two lines that look the same refuse to match.
What each option does
- Collapse repeated spaces replaces any run of spaces or tabs inside a line with a single space.
- Trim each line removes spaces and tabs at the start and end of every line.
- Fix invisible characters removes zero-width spaces, zero-width non-joiners, word joiners, soft hyphens and byte order marks, and converts non-breaking spaces and other special spaces, including the wide space used in East Asian text, into normal spaces.
- Collapse multiple blank lines keeps at most one empty line between paragraphs.
- Convert tabs to spaces replaces each tab with the number of spaces you choose.
The cleaner applies the options in a fixed order: invisible characters first, then tabs, then repeated spaces, then trimming, then blank lines. Line endings from Windows (CRLF) are normalized to a single line break.
Example
The text “ Hello␣␣world “ with a non-breaking space between the two normal spaces becomes “Hello world” with the default options. The summary reports one invisible character fixed, because the non-breaking space was converted before the spaces were collapsed.
When to be careful
Some documents rely on exact spacing. Code in languages such as Python uses indentation to define structure, and poetry or ASCII art depends on precise alignment. For those, turn off trimming and space collapsing and keep only the invisible character fix, which is almost always safe.
Frequently asked questions
- What are invisible characters?
- Characters that take up no visible space but are still part of the text, such as the zero-width space, the zero-width joiner and the byte order mark. They often come along when you copy from web pages, PDFs or chat apps, and they can break searches, comparisons and form validation.
- What is a non-breaking space?
- A space that looks normal but stops a line from breaking at that point. Word processors and websites insert them automatically, for example between a number and its unit. This tool turns them into ordinary spaces.
- Will cleaning break my emoji?
- No. Some emoji, such as family or profession emoji, are built from several emoji joined with a zero-width joiner. The cleaner keeps joiners that sit between emoji and removes only stray ones.
- Does trimming remove line breaks?
- No. Trimming removes spaces and tabs at the start and end of each line but keeps the lines themselves. Use Collapse multiple blank lines if you also want to reduce empty lines.
- Should I convert tabs to spaces?
- Only if the destination expects spaces, such as some code editors or forms. For tables pasted from a spreadsheet, tabs separate the columns, so leave this option off.
- Is my text uploaded?
- No. Everything happens in your browser.