Skip to content
Utilboxes

Text Cleaner

Tidy up text pasted from a PDF, an email or a web page — extra spaces, broken line breaks, smart quotes and invisible characters.

Runs entirely in your browser

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.

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.