Guide
Cleaning up text pasted from PDFs, emails and web pages
Copy text from a PDF and every line ends with a hard break. Copy from an email thread and you get stray tabs and double spaces. Copy from a web page and invisible characters come along, then break a formula or a search. The Text Cleaner fixes these problems with switches: paste the messy text on the left, and the clean version appears on the right, updating as you toggle options.
Recipes by source
From a PDF. The defaults are designed for this: Join broken lines into paragraphs reconnects the lines, Re-join words split by a hyphen turns docu- ment back into document, and spacing is tidied. Lines that look like list items, starting with a bullet or a number, keep their line breaks so lists stay lists.
From an email thread. Keep the defaults, and add Remove bullets and list numbers if you’re turning a list into prose. Long threads often contain tabs and runs of spaces, which Turn multiple spaces and tabs into one space removes.
From a web page or a rich-text editor. Switch on Remove HTML tags if the text contains markup such as <p> or <br>. Paragraph and line-break tags become real line breaks, and common entities like & are decoded. Keep Remove invisible characters on; web pages are full of non-breaking spaces.
For a form or system that rejects “special characters”. Switch on Straighten smart quotes and dashes. Curly quotes (“ ” ‘ ’), long dashes (– —) and the one-character ellipsis (…) from word processors become plain " ' - .... They’re often what an upload form, an SMS gateway or an old database chokes on.
For a clean list. Switch on Remove all empty lines. For deduplicating or sorting a list, follow up with Remove Duplicate Lines.
For a plain-text version of a post. Remove emoji and Remove links strip decorations and URLs, which is useful when reusing social media copy in a document.
What “invisible characters” are
Some characters take up no visible space but still exist in the text:
| Character | Where it comes from | Typical problem |
|---|---|---|
| Zero-width space | Web pages, chat apps | Search fails; two “identical” words don’t match |
| Soft hyphen | Typeset documents, PDFs | Odd hyphens appear when pasted elsewhere |
| Non-breaking space | Web pages, Word | Spreadsheet formulas or code treat it as a different character |
Remove invisible characters (on by default) deletes zero-width characters and soft hyphens and turns special spaces into normal ones. If two pieces of text look identical but a comparison or a VLOOKUP says they differ, this is usually the fix.
Check what changed
Below the panels, the character counts before and after, and the number removed, show how much was cleaned. A very large number removed can mean an option took out more than you intended. Remove all empty lines, for example, merges paragraphs into one block, so check the result before copying it.
What it doesn’t do
The cleaner never changes words: no spelling, grammar or wording changes, and it can’t restore formatting like bold or headings that was lost when copying. For targeted changes to specific words, use Find and Replace. For capitalization, use the Case Converter.
Your text and your preferred switches are remembered in this browser for next time, and nothing is uploaded.
Who cleans up text
- Office workers paste text from PDFs that arrives with broken lines and stray hyphens.
- Bloggers and marketers clean text copied from Word or Google Docs before pasting it into a website editor, removing hidden formatting characters.
- Developers and data workers remove invisible characters, such as zero-width spaces, that break code, searches and imports.
- Students tidy quotes and notes collected from many sources.
- Translators prepare clean source text for translation tools.
A complete example: text copied from a PDF
PDF text often looks like this: lines broken mid-sentence, words split as “infor-” and “mation”, double spaces.
- Paste the text. The default switches already join broken lines, re-join hyphenated words, collapse spaces and trim lines.
- Compare the messy and clean versions side by side.
- Check lists: lines starting with bullets or numbers stay as separate lines.
- Copy the clean text into your document.
A complete example: text for a website editor
Text from word processors brings curly quotes, long dashes and invisible characters. Switch on straighten smart quotes and dashes if your system or code needs plain characters, and keep remove invisible characters on. The result pastes cleanly into content systems and code.
Tips
- Turn on remove all empty lines for lists, but leave it off for prose, where empty lines separate paragraphs.
- Remove HTML tags helps when you’ve copied source code instead of text.
- For specific patterns, such as removing every line that starts with “Page”, use Find and Replace.
Checked against the current version of the Text Cleaner on .

