Skip to content
ToolFarmToolFarm
Text

Text Cleaner

Strip invisible characters, stray spaces and smart quotes out of pasted text. Each cleanup is a switch, all in your browser.

2 min read
Options

What this tool does

Text pasted out of a word processor, a PDF or a web page arrives carrying things you cannot see: zero-width spaces, non-breaking spaces, control characters, curly quotes that look identical to straight ones. They sit there quietly until a CSV import fails, a search does not match, or two strings that look the same compare as different. This cleans them out, and every operation is its own switch because clean means something different every time. The whitespace and invisible-character fixes are on by default since they only ever remove junk. Straightening quotes and dashes is off by default, because that is a real change to your content rather than a cleanup, and you should be the one to ask for it.

What you can use it for

  • Fix a list pasted from a document before importing it as CSV.
  • Find out why two identical-looking strings refuse to match.
  • Tidy text copied from a PDF, where every line arrives padded with spaces.
  • Replace curly quotes with straight ones before pasting into code.

How to use it

  1. Paste the text you want cleaned.
  2. Leave the default switches on for the usual whitespace and invisible-character mess.
  3. Turn on the typography switch if you also want straight quotes and plain dashes.
  4. Copy the cleaned result.

Everything runs inside your browser. No file is uploaded to any server. See more tools in this field.

Text

Frequently asked questions

What is a zero-width space and why does it matter?

It is a real character that takes up no room on screen, so text containing one looks completely normal. It survives copying, and it makes two otherwise identical strings compare as different. That is why a search finds nothing, a lookup fails, or a duplicate check misses an obvious duplicate for no visible reason.

Will it remove my tabs and line breaks?

No. Tabs, line feeds and carriage returns are real text and are kept. Only the control characters that have no business in content are removed. Line endings are normalised to a single style, which is never a change in meaning.

Why is the quote straightening off by default?

Because it changes your writing rather than cleaning it. A curly apostrophe is typographically correct in prose and only becomes a problem in code, CSV or a system that cannot handle it. Removing an invisible character is always right; rewriting punctuation is a judgement call, so it is yours to make.

Can I run it twice safely?

Yes. Cleaning an already-clean text changes nothing further, so you can paste the result back in without it degrading.