Text Cleaner
Tidy text copied from PDFs, web pages, emails or word processors. Remove hidden characters and extra spaces, fix broken lines, and see a count of every change.
About Text Cleaner
Text copied from PDFs, web pages, chat apps and word processors often carries things you cannot see: line breaks in the middle of sentences, double spaces, non-breaking spaces, zero-width characters and curly quotes. They cause odd wrapping, failed searches, broken spreadsheet lookups and messages that cost more to send. Text Cleaner removes them and lists every change it made, so nothing happens silently.
Each option can be switched on or off: remove invisible characters, turn special spaces into normal spaces, straighten smart quotes, trim spaces at the start and end of each line, collapse repeated spaces and tabs, and remove blank lines. For line breaks you can keep them, join the lines of each paragraph, or put everything on one line.
When to use it
- Text pasted from a PDF breaks in the middle of every sentence.
- A spreadsheet lookup fails because a value has a hidden space or zero-width character.
- You need plain straight quotes for code, CSV files or a system that rejects curly ones.
Worked example
Paste this text, where the first line starts with two spaces, The and quick are joined by a non-breaking space, there is a zero-width space after over the, and two blank lines sit between the paragraphs:
The quick brown fox / jumps over the lazy dog. / (blank) / (blank) / It’s “done”.
With all options except “Remove blank lines” and with “Join lines, keep paragraphs”, the result is two paragraphs: The quick brown fox jumps over the lazy dog. and It's "done". The report lists 1 invisible character removed, 1 special space changed, 3 smart quotes straightened, 2 lines trimmed, 1 run of extra spaces collapsed, 1 blank line removed and 1 line break removed.
Good to know
- Zero-width joiners are kept, because family emoji and some scripts, such as Hindi and Persian, need them.
- Dashes, ellipses and accents are never changed.
- To change specific words or patterns afterwards, use Find and Replace. To drop repeated lines, use Remove Duplicate Lines.
How to use Text Cleaner
- Paste the text you want to clean.
- Choose the cleaning options and how to treat line breaks.
- Select Clean text, check the list of changes and copy the result.
Privacy: how it works
Everything happens in your browser. Your text is not sent to any server.
Frequently asked questions
Which invisible characters are removed?
Zero-width spaces, word joiners, byte-order marks, soft hyphens and invisible maths operators. Zero-width joiners and non-joiners are kept, because emoji and some scripts need them.
How do I fix text copied from a PDF?
Choose "Join lines, keep paragraphs". Lines inside a paragraph are joined with a space and one blank line is kept between paragraphs.
Are dashes and ellipses changed?
No. Only the options you tick are applied; smart quotes are the only punctuation that can be changed.