Strip extra spaces, tabs, blank lines, invisible Unicode characters, smart quotes, and other text gunk introduced by PDFs, Word docs, and websites. Free instant text cleaner.
Clean up text that has been polluted by copy-pasting from PDFs, Word documents, or websites — extra spaces, tabs, hidden zero-width characters, non-breaking spaces, smart quotes, em-dashes, ellipses, soft hyphens, and BOM markers. The tool exposes 25+ cleaning operations grouped into four categories (whitespace, blank lines, invisible characters, quotes & punctuation, line endings) plus six one-click presets ("From PDF", "From Word", "Clean copy-paste", "Code", "Strict", "Reset"). A unique "Show invisible characters" mode visually highlights every space, tab, and zero-width character so you can see exactly what is being cleaned. Live stats show input vs output character count and the count of invisible characters removed.
The Unicode standard defines hundreds of "format" characters — characters that influence rendering without taking visible space. Most of them are essential (right-to-left marks for Arabic and Hebrew, joining controls for Devanagari and Arabic ligatures), but a handful regularly cause trouble: zero-width space (U+200B) used by some word processors as a soft break, byte order mark (U+FEFF) added to UTF-8 files by Notepad and Excel, non-breaking space (U+00A0) inserted by Word to keep "Mr. Smith" on one line, soft hyphen (U+00AD) marking optional hyphenation in PDFs. Each is invisible to your eye but visible to compilers, search engines, and string-comparison logic. A username like "alice" with a trailing zero-width space will not match the database row for "alice" and the difference is impossible to see.
Clean copy-paste is the all-purpose default — trim each line, collapse spaces, normalise quotes, strip invisible characters. Use it whenever you paste from anywhere into anywhere and just want it cleaned. From PDF additionally handles soft hyphens and the line-break artefacts PDFs introduce. From Word additionally handles non-breaking spaces and the em/en-dash conventions Word inserts. Code is gentler on whitespace — preserves indentation but normalises tabs and trims trailing whitespace, which is what every code editor does on save. Strict strips ALL whitespace including line breaks — destructive but useful for one-line normalisation (e.g. cleaning a multi-line API key into a single token).
Most text-cleaning tools just give you cleaner output. This one also shows what was wrong with the input. Toggle the visualisation and the input renders in monospace with every space marked as ·, every tab as →, every newline as ¶, and every zero-width / non-standard character highlighted in red. It turns invisible problems into obvious ones — perfect for debugging "why does my comparison fail" or "why is my CSV importing wrong". Toggle it off to return to a normal preview. The cleaned output side stays plain so you can copy without the markers.
They are real Unicode characters (U+200B zero-width space, U+200C zero-width non-joiner, U+200D zero-width joiner, U+FEFF byte order mark, U+00A0 non-breaking space, U+00AD soft hyphen) that take no visible space but exist in the text. They appear when you paste from formatted documents, when someone pastes from a tool that normalises spacing, or sometimes from spam/phishing emails trying to evade keyword filters. They cause search to fail, code to crash, and length counts to be wrong — invisible problems that this tool surfaces and removes.
Word and Google Docs auto-replace straight quotes with typographically correct curly quotes (" " ‘ ’) for visual polish. They look fine in prose but break code (Python and JavaScript only accept straight quotes for string literals), break some search/comparison logic, and look inconsistent when mixed with other text. The "Smart quotes → straight" option converts them back, fixing copy-pasted code snippets in seconds.
PDF copy-paste typically introduces soft hyphens (U+00AD) at the line breaks where the original text was hyphenated, plus ligatures like fi (fi) and fl (fl). The PDF preset specifically strips soft hyphens and normalises ligatures. Word paste typically introduces non-breaking spaces and curly quotes but no soft hyphens. The two presets share most operations but differ on the source-specific quirks.
Yes — for languages where indentation matters (Python, YAML, Markdown code blocks, Pug, Stylus, indent-sensitive DSLs) you must NOT collapse multiple spaces. Use the "Code" preset instead, which keeps indentation but normalises tabs, removes trailing whitespace, and collapses blank lines. For prose and markup languages where indentation is just formatting, full collapse is safe.
Toggle "Show invisible characters" — the input text re-renders with every space, tab, newline, and zero-width character visualised as a coloured marker. Compare it to the output to see exactly what was cleaned. The stats panel also reports the count of invisible characters removed numerically.
Related: remove extra spaces, whitespace cleaner, text cleaner, remove blank lines, remove invisible characters, zero width space remover, smart quote converter, remove non breaking space, clean copy paste text, pdf text cleaner, word text cleaner, remove em dash, normalize line endings, strip whitespace, text formatting tool, remove bom, text gunk remover, unicode cleaner