Text Cleaner
Fix text pasted from PDFs and web pages: extra spaces, blank lines, broken lines and invisible characters.
Text
Cleaned
The cleaned text appears here as you type.
Runs in your browser — nothing you enter leaves this device.
About this tool
What it does
Text copied from a PDF, a Word document, a web page or a chat app rarely arrives clean. Lines break in the middle of sentences, words are split with a hyphen at the end of a line, spaces double up, blank lines pile up, and there are characters you can’t even see: zero-width spaces, no-break spaces and byte-order marks that make a search fail or a spreadsheet cell refuse to match. Text Cleaner fixes these in one step. Each fix is a switch you can turn on or off, the result updates as you change them, and a short list under the result says exactly what changed — “Removed 3 invisible characters”, “Joined 12 broken lines” — so nothing happens to your text without you knowing.
How to use it
- Paste your text into the box, or press Try an example to see a typical PDF paste.
- The common fixes are on already: invisible characters, odd spaces, trimming, repeated spaces and runs of blank lines.
- For text from a PDF or an email, turn on Join lines broken mid-sentence. Paragraphs separated by a blank line stay separate.
- Turn on Plain quotes, dashes and … when the text is going into code, a CSV file or a system that only accepts plain characters.
- Choose what to do with blank lines and line endings, then copy or download the cleaned text.
Limits and your data
- Invisible characters removed are the zero-width space, word joiner, byte-order mark and soft hyphen. The zero-width joiner and non-joiner are kept on purpose: they decide how Devanagari and other Indian scripts join letters, and how emoji such as family groups are drawn.
- Odd spaces — no-break, thin, narrow and ideographic spaces — become ordinary spaces. If a no-break space was there to keep “₹ 500” on one line, it no longer will.
- Joining broken lines can’t tell a line broken by a PDF from a short line you meant, such as an address or a poem. Leave it off for those.
- A word hyphenated across two lines is mended only when both parts are in small letters, so “COVID-” followed by “19” keeps its hyphen.
- Indentation at the start of a line is kept unless Trim each line is on, so code and nested lists keep their shape.
- Cleaning happens in your browser. Your text isn’t uploaded or saved, and it’s gone when you leave the page.
Questions
How do I remove line breaks from text copied from a PDF?
Turn on Join lines broken mid-sentence. Lines within a paragraph are joined with a space, and a word split with a hyphen at the end of a line is joined back together. A blank line between paragraphs keeps them apart.
What is a zero-width space and why remove it?
It’s a character with no width at all, often added by websites and chat apps. You can’t see it, but a word with one inside is a different word to a computer, so logins, searches and spreadsheet lookups fail. Removing it changes nothing you can see.
Will it change my Hindi or Tamil text?
Only spaces and line breaks, if you ask it to. Letters, vowel signs and the joiners that shape conjuncts are never touched.
Why straighten quotes and dashes?
Curly quotes, long dashes and the single-character ellipsis look better in prose but break code, command lines, CSV files and some older systems. Plain quotes, dashes and … turns them into straight quotes, hyphens and three full stops.