About this text cleaner
Text copied from PDFs, emails, websites and chat apps arrives full of junk: line breaks in the middle of sentences, double spaces, empty lines, stray HTML, invisible zero-width characters and curly "smart" quotes that break code. This tool fixes all of it in one pass — you choose exactly which cleanups to apply.
How to clean messy text
- Paste the messy text into the box.
- Tick the cleanups you want — the defaults (collapse spaces, trim lines, remove empty lines, strip invisible characters) fix the most common paste problems.
- Choose Remove all line breaks when a PDF has chopped every line short, or Remove duplicate lines for lists and log files.
- Press Clean text, then copy or download the result.
What each option does
- Strip HTML tags — removes markup like
<div>and converts entities such as&back to normal characters. - Remove invisible characters — deletes zero-width spaces and non-breaking spaces that cause mysterious bugs in code and spreadsheets.
- Smart quotes → straight quotes — converts “curly” quotes and long dashes to plain ASCII, essential when pasting into code or configuration files.
- Remove duplicate lines — keeps the first occurrence of each line; perfect for deduplicating email lists and keywords.
Frequently asked questions
What are invisible characters and why remove them?
Zero-width spaces and non-breaking spaces sneak in when copying from websites and chat apps. They're invisible but break code, spreadsheets, form validation and search — this tool strips them in one pass.
Why do PDFs paste with broken lines?
PDFs store text line by line as it appears on the page, so pasting carries a line break at the end of every visual line. Tick 'Remove all line breaks' to rejoin the text into flowing paragraphs.
Will cleaning change my actual words?
No — every option only affects whitespace, duplicate lines, markup and special characters. Your wording stays exactly as written.