Text Cleaner
Unwrap broken lines, collapse spaces and strip the junk out of pasted text.
Clean Up Text That Came From Somewhere Else
Text copied out of a PDF arrives broken at every line the original happened to end on. Text from an email carries quote markers and stray indentation. Text from a web page brings invisible characters that break search and diff without ever showing themselves.
The interesting problem is unwrapping. Joining every line would destroy the paragraphs; joining none leaves the text unusable. The rule that works is to join a line to the next only when it does not end in sentence punctuation — which is what this does.
Key features
- Intelligent unwrapping — hard-wrapped lines are rejoined, paragraph breaks survive.
- Invisible characters removed — zero-width spaces and bidi controls that travel through copy and paste unseen.
- Rejoins hyphenated breaks — “hyp-\nhenated” becomes “hyphenated”, which is what a PDF column break produces.
- Email and list markers — strip
>reply quoting and leading bullets or numbers. - Presets for the common sources — one click each for pasted email and text copied from a PDF.
This tool runs entirely inside your browser using native Web APIs. Your files and text are never uploaded to a server, never logged and never shared with third parties.
How to use: Text Cleaner
- Paste your text
From a PDF, an email, a web page — wherever it came out badly. - Pick a preset
Pasted email and copied-from-a-PDF cover most cases; adjust the individual switches after. - Check the counters
Characters in, out and removed, so you can see how much was junk. - Copy the result
The cleaned text is ready to paste on.
Technical specifications
| Processing location | Entirely in your browser — no server round trip |
|---|---|
| Data uploaded | None. Files and text never leave your device |
| Price | Free — no account, no trial, no usage cap |
| Category | Text |
| Works offline | Yes, once the page has loaded |
| Browser support | Chrome 90+, Edge 90+, Firefox 90+, Safari 15+ |
| Interface languages | English, 中文, हिन्दी, Español, العربية |
Frequently asked questions
How does it know which line breaks to remove?
A line that ends in <code>.</code>, <code>!</code>, <code>?</code>, <code>:</code> or <code>;</code> is treated as finished and its break is kept. Any other line is joined to the next. That single rule handles hard-wrapped prose correctly almost every time.
What are invisible characters and why remove them?
Zero-width spaces, joiners and bidirectional controls. They are copied along with text from many web pages and carry no visible meaning, but they break exact-match search, confuse diffs and can make two identical-looking strings compare as different.
Will it damage code or poetry?
Unwrapping would, since both rely on their line breaks. Turn off "Join lines broken mid-sentence" — every option is independent, and the "Nothing" preset switches them all off so you can enable only what you need.
Is my text sent anywhere?
No. It is processed in the page as you type, and nothing is stored or transmitted.