How to use the text cleaner
- Paste the messy text on the left. The cleaned version updates on the right immediately.
- Switch the cleaning steps on or off: extra spaces, line breaks, trimming, HTML tags, smart punctuation, non-printable characters, numbering and bullets.
- Check the before/after character, word and line counts to see what changed.
- Copy the clean text or download it as a .txt file.
Features
- Collapse runs of spaces and tabs into a single space
- Keep line breaks, collapse blank lines, or join everything into one paragraph
- Strip HTML tags and decode entities like & and
- Convert curly quotes, en/em dashes, ellipses and non-breaking spaces to ASCII
- Remove zero-width characters, control characters and byte-order marks
- Remove 1. 2. a) - • numbering and bullets from list lines
- Before and after statistics for characters, words and lines
Where messy text comes from
PDF viewers insert a line break at the end of every visual line, so pasted paragraphs arrive chopped into short pieces. Word processors replace straight quotes with curly ones and double hyphens with dashes, which breaks code, CSV files and search queries. Web pages carry HTML tags, non-breaking spaces and invisible zero-width characters that survive copy and paste and cause mysterious mismatches later.
Choose “Remove all” line breaks to rebuild paragraphs from PDF text, “Collapse blank lines” to tidy double-spaced documents, and “Plain quotes and dashes” before pasting into code or a terminal.
What counts as non-printable
Control characters (except tab and line break), the C1 control range, zero-width spaces and joiners, word joiners, soft hyphens and the byte-order mark. These are invisible but can break string comparisons, URLs and passwords.