CODDY Tool

Text Cleaner

Strip duplicate lines, extra spaces, HTML tags and smart quotes from text.

Clean up messy text in one pass. Remove duplicate and empty lines, collapse runs of whitespace, strip HTML tags, drop numbers or punctuation, and convert smart quotes and em dashes back to plain ASCII.

Everything you enter stays in this browser tab. Nothing is sent to our servers, logged or stored.

Loading tool…

What Text Cleaner supports

  • Collapse extra spaces
  • Trim each line
  • Remove empty lines
  • Remove duplicate lines
  • Remove line breaks
  • Remove numbers
  • Remove punctuation
  • Remove non-ASCII characters
  • Strip HTML tags
  • Normalise smart quotes

About Text Cleaner

Text that has been copied between applications arrives dirty. A paste from a web page brings HTML entities and non-breaking spaces, a word processor substitutes smart quotes and em dashes that break code and CSV files, and merged lists collect duplicates that are impossible to spot past a few dozen rows.

This applies every clean-up you select in a single pass, in an order chosen so the operations do not fight each other — tags are stripped before whitespace is collapsed, so the gaps they occupied close up, and line breaks are removed last so the line-level operations still have lines to work with.

Each option is independent, so you can be as aggressive or as conservative as the job needs, and the result is shown next to a running count of how much was removed.

How to clean up text

  1. Paste your text

    Any length. Nothing is uploaded.

  2. Choose the clean-up steps

    Tick the operations you want. They apply together in a sensible order.

  3. Review the result

    The cleaned text appears live, with a summary of what changed.

  4. Copy or download

    Copy the result to the clipboard or save it as a text file.

Common uses

  • Deduplicating an email or subscriber list before importing it.
  • Stripping HTML from content pasted out of a web page or CMS.
  • Fixing smart quotes and em dashes that break code, CSV files and terminal commands.
  • Collapsing the ragged whitespace left by an OCR or PDF extraction.
  • Joining a hard-wrapped paragraph back into a single line.

Frequently asked questions

Does cleaning change the order of my lines?

No. Lines stay in their original relative order throughout. Removing duplicates keeps the first occurrence of each value and drops the later ones, so the sequence you started with is preserved.

What does normalising smart quotes do?

It converts typographic characters back to plain ASCII: curly quotes become straight quotes, en and em dashes become hyphens, and an ellipsis character becomes three full stops. This is what fixes code and CSV files that a word processor has quietly broken.

Will stripping HTML leave the text readable?

Yes. Tags are removed and the text between them is kept, so a paragraph of marked-up content becomes the same paragraph as plain text. Combine it with collapsing spaces to tidy up the gaps the tags leave behind.

Is my text uploaded anywhere?

No. Everything runs in your browser, which matters for customer lists, email addresses and anything else you should not paste into a server-side tool.

All Text Tools

Text Cleaner is free to use with no account, no watermark and no usage limits. Last updated 14 August 2026.