Skip to content
Utilboxes

Text Cleaner

Paste text from a PDF, email or web page and switch on the fixes you need: collapse extra spaces, join broken PDF line breaks while keeping real paragraphs, straighten smart quotes, strip invisible characters or remove HTML tags. The preview updates as you toggle each one. Your text is never uploaded.

Runs entirely in your browser

Updated

How to use the Text Cleaner

  1. 1Paste your messy text.
  2. 2Switch on the fixes you need; each one is independent.
  3. 3Watch the preview update as you toggle them.
  4. 4Copy the cleaned result.

How it works

Text copied from a PDF or an email arrives with problems that are invisible until they cause trouble. Non-breaking spaces look identical to ordinary spaces but break search and word wrap. Zero-width characters have no appearance at all yet corrupt string comparisons. Smart quotes and em dashes break code and some data imports.

Line breaks are the most common problem with PDF text. A PDF breaks lines to fit the page, not to end paragraphs, so pasted text arrives with a break after every visual line. The line-joining option merges those back into flowing paragraphs while keeping genuine paragraph breaks — it treats a blank line as a real break and a single break as an artefact.

HTML stripping removes tags and decodes entities, turning copied web markup back into plain text. It operates on the text as data and never renders it, so pasting hostile markup here cannot do anything.

Your text is processed by JavaScript running in this page and is never sent over the network. That matters when you are pasting a draft, a client brief, meeting notes or anything else you would rather not hand to a server.

Tips and common mistakes

  • Turn on line joining for text copied out of a PDF, so each paragraph flows again.
  • Straighten smart quotes before pasting text into code, a CSV file or a data import.
  • Remove invisible characters when two pieces of text that look identical will not match.
  • Switch on only the fixes you need and check the preview after each one.

Frequently asked questions

Why does my PDF text have a line break after every line?
PDFs break lines to fit the page rather than to mark paragraphs. Turn on "Join broken lines" and genuine paragraph breaks are kept while the rest are merged.
What are invisible characters and why remove them?
Zero-width spaces, joiners and byte-order marks carry no appearance but break searching, sorting and comparison. They arrive from web pages and word processors without warning.
What are smart quotes?
Curly typographic quotes and apostrophes that word processors substitute automatically. They look better in prose but break code, CSV files and some data imports.
Is it safe to paste HTML here?
Yes. The text is only ever treated as data — it is never inserted into the page as markup, so nothing in it can execute.
How do I remove extra spaces?
Turn on the option that collapses spaces, and runs of spaces become single spaces.
Can I turn HTML into plain text?
Yes. Strip HTML removes the tags and turns entities such as & back into ordinary characters.
Is my text uploaded?
No. Every fix runs in the page, and the text never leaves your browser.

Guides