Text Cleaner
Fix messy text: collapse double spaces, trim lines, remove empties and stray control chars.
The Text Cleaner repairs the formatting damage that copy-pasting inflicts: double spaces, ragged line endings, blank lines everywhere, curly quotes that break your code, and invisible control characters smuggled in from terminals and PDFs.
Toggle exactly the repairs you need: collapse runs of spaces to one, trim every line, remove empty lines, straighten curly quotes and em dashes to plain ASCII, and strip control characters. The tool reports whether anything actually changed, so you can paste a clean block and confirm it was already tidy.
Clean input prevents real bugs — a curly quote inside a code string or config value can break parsing in ways that are invisible until runtime. Cleaning is instant and runs locally in your browser.
How to use the Text Cleaner
- Paste the messy text.
- Tick the repairs you want (most are on by default).
- Watch the cleaned output update live.
- Check the 'no changes needed' notice when your text was already clean.
- Copy the result into your document, config or code.
Frequently asked questions
What are control characters?
Invisible non-printing characters (code points below 32, minus tab/newline) that sneak in when text is pasted from terminals, old systems or PDFs. They can break JSON, YAML and config parsers — this tool strips them on request.
Why straighten curly quotes?
Word processors insert typographic 'smart' quotes (' ' ' ' and – —). They look nicer in prose but are not what code, CSV data or slug generators expect. Straightening converts them to ASCII quotes and hyphens.
Can the cleaner fix my text automatically?
It applies every toggle you enable continuously as you type or paste — there is no separate 'clean' button to remember. Just enable the repairs once and paste.
Related tools
View all text tools →Word Counter
Count words, characters, sentences and paragraphs as you type — with estimated reading time.
Text ToolsCharacter Counter
Count characters with and without spaces — with live platform-limit gauges.
Text ToolsSentence Counter
Count sentences and measure average sentence length for readable writing.
Text ToolsParagraph Counter
Count paragraphs, average paragraph length and empty lines in your text.
Text ToolsReading Time Calculator
Estimate how long it takes to read any article or essay.
Text ToolsCase Converter
Convert text between UPPER, lower, Title Case, sentence case, camelCase and kebab-case.