Text copied out of a PDF, a spreadsheet, an email thread or a CMS arrives with double spaces, broken line breaks, HTML tags and repeated lines. Tick the fixes you need and the cleaned text appears beside your input.
Spaces and line breaks: collapse runs of spaces, trim every line, remove empty lines or join them into one paragraph.
Structure: strip HTML tags, remove duplicate lines, sort lines A→Z, Z→A or by length, and count what changed.
Characters and case: clean invisible characters, special characters and emoji, then switch to UPPER, lower, Title, Sentence, camelCase or snake_case.
Timing numbers mixed with text, unsorted lines, duplicate cues
Sort lines + remove duplicates
Options apply in the order shown in the tool, not the order you click them. HTML stripping runs before duplicate detection, so “<p>Same line</p>” and “Same line” are treated as the same line.
Case conversion, with the exact output
Case modes are not cosmetic: identifiers, file names, API keys and CSS classes break when the wrong one is used. The right column is what this tool produces for the input on the left.
Mode
Input
Output
Use it for
UPPER CASE
order status
ORDER STATUS
Constants, labels that must not be missed
lower case
Order Status
order status
Emails, URLs, tags
Title Case
how to clean a draft
How To Clean A Draft
Headings and menu labels (check your style guide for small words)
Sentence case
the page is not found. try again.
The page is not found. Try again.
Prose and UI messages
camelCase
order status code
orderStatusCode
Variables and JSON keys
snake_case
Order Status Code
order_status_code
Database columns, Python names, file names
camelCase and snake_case strip punctuation and spaces. Never apply them to prose you intend to publish — they are for identifiers, not sentences.
How to use the text cleaner
1
Paste the messy text
Copy from wherever the text came from and paste it into the input box. Nothing is uploaded.
2
Tick the fixes
Each option applies on top of the previous one, in the order shown. Leave alone what you want to keep.
3
Copy or download
The result box is editable, so you can make a last manual fix before copying it or saving a .txt.
In practice: four batches people actually clean
A product catalogue pasted from a supplier sheet
Supplier sheets mix full-width spaces, doubled spaces and line breaks inside one product name. Turn on “collapse spaces”, “trim each line” and “remove empty lines”, then sort by length to spot the names that are suspiciously short — usually the ones where a size or colour was cut off.
Translation memory and glossaries
TM exports arrive with duplicate segments that differ only in trailing spaces or case. Turn on duplicate removal with “ignore case” and the list shrinks to the segments that genuinely differ — the ones a translator has to look at.
Notice text that has to be plain
Announcements get pasted into email, an LMS, a CMS and a printed handout. Strip HTML, remove emoji and invisible characters, and keep sentence punctuation — then the same text survives every destination without smart quotes turning into question marks.
Transcripts and OCR output before quoting
A quote taken from OCR carries the scanner’s mistakes. Remove special characters, collapse spaces, then read the result for meaning — this tool cleans the shape of the text, not its accuracy. Numbers and names still need a human check against the original.
Questions about cleaning text
What order are the options applied in?
Line-level work happens first — HTML tags, invisible characters, spaces and line breaks — then duplicate removal, sorting, the character filters and finally case conversion. That order means a duplicate check sees the lines after trimming, and sorting sees them after duplicates are gone.
Does stripping HTML remove the text inside the tags?
No. Tags are removed and their text is kept, and common entities such as & and are decoded back to characters. Script and style blocks are dropped whole, because their contents are code rather than text. A line break is inserted where a block tag (p, div, br, li, heading) ended, so paragraphs do not merge into one run-on line.
Can I clean several files at once?
Not as files — this tool takes pasted text, one document at a time, and deliberately has no file upload. For a batch of documents the honest answer is that a script is a better tool than a web page; here the point is that nothing you paste leaves the tab.
Which case conversions are available?
UPPER CASE, lower case, Title Case (each significant word capitalised), Sentence case (first letter of each sentence), camelCase and snake_case. camelCase and snake_case are meant for identifiers: they strip punctuation and spaces and join the words, so they are the wrong choice for prose you intend to publish.
Is the original text changed or saved?
Neither. The input box keeps what you pasted, the result is written separately, and the page stores nothing — closing the tab clears both. If you want the result to become the new input, use “Use result as input”, but the original is still one undo away until you paste over it.