Text Cleaner
Paste messy text and get a version without hidden characters, doubled spaces or runs of empty lines.
Runs in your browser. Nothing you enter is uploaded.
What it does
Text copied from PDFs, websites, Word or phone notes often carries characters you cannot see: non-breaking spaces, zero-width spaces, byte-order marks and trailing tabs. The cleaner removes them, collapses doubled spaces into one, and reduces three or more line breaks to a single blank line.
Paragraph breaks are kept, so the structure of a caption, email or article survives. It is handy right before pasting into a CMS, a social post, a spreadsheet cell, or a form that rejects "invalid" characters. Copy the result with one click once it looks right.
How to use it
- 1
Paste your text into the Messy text box.
- 2
Read the result in the Cleaned box, which updates as you type.
- 3
Click Copy above the Cleaned box to copy the result.
What you get
The same text with non-breaking spaces turned into normal spaces, zero-width characters and BOMs removed, repeated spaces and tabs reduced to one space, trailing spaces removed, at most one blank line between paragraphs, and no leading or trailing whitespace.
When to use it
- Fix captions from notes apps
- Remove stray double spaces and trailing spaces that make a caption look uneven once posted.
- Clean text copied from PDFs
- Collapse the extra spaces and blank lines that PDF copying often inserts between words and paragraphs.
- Hunt invisible characters
- Strip zero-width spaces and byte-order marks that break search, word matching or form validation.
- Prepare data for imports
- Clean a pasted list before converting it, so values do not carry hidden trailing spaces.
Example
Input
Launch day is here! (followed by four line breaks) Link in bio.
Output
Launch day is here! Link in bio.
Double spaces collapse, trailing spaces go, and the four line breaks become one blank line.
Tips
- Runs of spaces or tabs anywhere become a single space, including indentation at the start of a line. Do not use it on code, YAML or Python where indentation matters.
- Single blank lines are preserved, so if you want Instagram-style spacing between paragraphs, clean first and then run the result through the Instagram Caption Formatter.
- The cleaner does not change punctuation, curly quotes or emoji. Use Find and Replace for those.
- Zero-width joiners are removed too. That is fine for Latin text but can split some combined emoji sequences, so check emoji-heavy captions after cleaning.
Questions
What invisible characters does the text cleaner remove?
Zero-width space (U+200B), zero-width non-joiner (U+200C), zero-width joiner (U+200D) and the byte-order mark (U+FEFF). Non-breaking spaces (U+00A0) are converted to normal spaces rather than deleted.
Will it remove the line breaks between my paragraphs?
No. Single line breaks and single blank lines stay. Only three or more consecutive line breaks are reduced to one blank line.
Why does a word search fail on text I copied from a website?
Copied text can contain non-breaking or zero-width characters between words, so "free trial" typed normally does not match. Cleaning replaces or removes them so searches and comparisons work.
Can I remove all line breaks to make one paragraph?
Not with this tool; it keeps paragraph structure on purpose. Use Find and Replace to swap line breaks for spaces instead.
Related tools
Related tools
