Text Cleaner
Text Tools · Added 10 July 2026
Text copied out of a PDF, an email client or a web page arrives full of invisible damage — double spaces, hard line breaks mid-sentence, non-breaking spaces, curly quotes and leftover markup. Tick the problems you want fixed and the cleaned text appears immediately.
Cleaned text
- Characters in
- 0
- Characters out
- 0
- Removed
- 0
Every option destroys information, so apply the narrowest fix that solves your problem. Removing all line breaks will flatten poetry, code and anything else where the layout carries meaning.
How to use the text cleaner
- 1Paste the messy text.
- 2Tick the cleaning options you need — they apply in a sensible order.
- 3Review the output and the summary of what changed.
- 4Copy the result, or press Swap to run another pass over it.
Examples
Text copied from a PDF
- Input
- Lines broken every 70 characters with double spaces after full stops
- Result
- Line breaks joined into paragraphs, spacing normalised to single spaces
Removing markup
- Input
- <p>Hello <strong>world</strong></p>
- Result
- Hello world
About the text cleaner
The invisible characters that break things
A large share of 'this file won't import' problems come down to characters you cannot see. Non-breaking spaces, zero-width joiners, byte-order marks at the start of a file, and Windows line endings mixed with Unix ones all look like nothing at all in an editor.
Cleaning them out is usually the fastest diagnostic step available. If a CSV suddenly parses after a whitespace normalisation pass, you have found your culprit without reading a single line of the file.
Clean, but do not over-clean
Every cleaning operation destroys information. Removing all line breaks turns a poem into a paragraph; stripping punctuation makes prose unreadable; collapsing whitespace ruins indentation-sensitive content such as Python or YAML.
Apply the narrowest fix that solves your problem, and keep the original until you have confirmed the result. The Swap button exists so you can layer passes deliberately rather than applying everything at once and hoping.
Frequently asked questions
What is a non-breaking space and why does it cause trouble?
Will stripping HTML remove the content inside tags?
Why replace curly quotes with straight ones?
Related tools
Remove Duplicate Lines
Text Tools
Strip duplicate lines from a list, with options for case sensitivity and trimming.
Word Counter
Text Tools
Live word, sentence and paragraph counts with reading time and keyword density.
Case Converter
Text Tools
Convert text between upper, lower, title, sentence, camel, snake, kebab and more.