Skip to content
Toolbench

Text Cleaner

Fix text that has been through a PDF, an email client or a word processor — one decision per switch.

Runs entirely in your browser

Loading tool...

How to use

  1. Paste the text exactly as it arrived.
  2. Turn on only what you want changed — every switch is one decision.
  3. Use “join wrapped lines” for anything copied out of a PDF or an email.
  4. Read the result before copying: unwrapping is the one that can guess wrong.

Features

  • Joins lines a hard wrap split mid-sentence, keeping paragraphs and lists apart.
  • Rejoins a word the wrap hyphenated.
  • Collapses repeated spaces and blank lines.
  • Straightens curly quotes and dashes, on request.
  • Removes zero-width and directional characters that break comparisons.

Frequently asked questions

Why is joining wrapped lines a separate switch?
Because it is the only operation here that has to guess. A line break is either the end of a thought or the middle of one, and nothing in the text says which. The rule used is that a line which does not end in sentence punctuation, and is followed by something that does not begin a new block, was wrapped — right nearly always for prose, and wrong often enough for poetry, addresses and code that it should not be on by default.
What are the invisible characters it removes?
Zero-width spaces and joiners, directional marks, byte-order marks and soft hyphens. They have no width, so text containing them looks identical to text without — and compares as different. They arrive by copying from web pages and are the usual reason a pasted value refuses to match.
Will straightening quotes break anything?
It changes characters, so it can. In code and in JSON, curly quotes are already broken and straightening fixes them. In prose intended for print, curly quotes are correct and this would undo a typographer's work — which is why it is off unless you ask.

See every character for what it is — including the ones you cannot see, which are usually the problem.

Clean up a list: sort it, remove repeats, drop blanks — with alphabets that sort correctly.

Switch text between upper, lower, title, camel and snake case.

Scan a page or your handwriting into editable text, in your browser.

Text Cleaner — Fix Pasted Text and Line Breaks