Text Cleaner
An umbrella cleanup tool. Pick the operations you want, run them in one pass, copy the result. Handles AI-pasted formatting, Word and PDF copy-paste cruft, hidden unicode, smart quotes, emoji, URLs, and more.
How to use the text cleaner
1. Paste the text
Drop any text into the Input box. The cleaner handles content from AI tools (ChatGPT, Claude, Gemini), word processors (Word, Google Docs, Pages), PDFs, HTML pages, code editors, and anywhere else text comes from. Long inputs work too, since processing runs in your browser.
2. Pick a preset or check operations
The fastest path is a preset. Click AI-pasted text cleanup, Word document copy, PDF copy-paste, Code comment cleanup, or Blog post draft and the right boxes get ticked. You can also pick individual operations: collapse spaces, remove line breaks, strip HTML, fix smart quotes, drop emoji, and 11 others.
3. Run the cleaner
Click Clean. Operations run in a fixed safe order so one never breaks another. For example, HTML tags get stripped before lowercasing happens, so tag names do not pointlessly clutter the lowercase step. URLs and emails get removed before tabs and newlines, so the URL pattern still matches.
4. Copy or download
The cleaned text appears on the right. The stats panel shows how many characters were removed and how many operations actually changed anything. Copy with one click, or download as a .txt file.
When you need a text cleaner
Text from one app rarely lands clean in another. Here are the most common sources of cruft and what the cleaner fixes.
What each preset actually does
The five presets each tick a specific set of operations. Use them as starting points and tweak from there.
- Smart quotes to straight
- Em-dashes to hyphens
- Remove emoji
- Collapse multiple spaces
- Remove empty lines
- Trim whitespace
- Normalize unicode (NFC)
- Smart quotes to straight
- Em-dashes to hyphens
- Collapse multiple spaces
- Trim whitespace
- Normalize unicode (NFC)
- Remove line breaks (joins wrap)
- Collapse multiple spaces
- Trim whitespace
- Smart quotes to straight
- Remove empty lines
- Remove line breaks (rewrap target)
- Collapse multiple spaces
- Remove tabs
- Trim whitespace
- Remove HTML tags
- Smart quotes to straight
- Em-dashes to hyphens
- Collapse multiple spaces
- Remove empty lines
- Trim whitespace
What each operation does
Sixteen operations are available. They run in a fixed safe order so one never breaks another. Here is what each one touches.
| Operation | Effect | Default |
|---|---|---|
| Collapse multiple spaces | Replaces runs of two or more spaces with one. | On |
| Remove line breaks | Strips all newlines. Paragraphs flatten into one line. | Off |
| Remove empty lines | Drops blank lines but keeps one as a paragraph separator. | On |
| Trim whitespace | Strips leading and trailing space on each line. | On |
| Remove tabs | Strips tab characters. | Off |
| Remove HTML tags | Strips tags, keeps text inside. Use the dedicated HTML tag remover for finer control. | Off |
| Remove numbers | Strips digits 0 to 9. | Off |
| Remove punctuation | Strips ASCII punctuation marks. | Off |
| Remove non-ASCII chars | Strips all characters above code point 127. Accents, symbols, foreign scripts. | Off |
| Remove emoji | Drops emoji and pictographs. | Off |
| Remove URLs | Drops http and https links. | Off |
| Remove email addresses | Drops user@host patterns. | Off |
| Smart quotes to straight | Replaces “”‘’ with " and '. | On |
| Em-dashes to hyphens | Replaces — and – with -. | On |
| Normalize unicode (NFC) | Combines decomposed accent sequences into single code points. | Off |
| Lowercase everything | A becomes a. Useful for search keys. | Off |
If you only need one of these operations, a dedicated tool will be faster: Remove Line Breaks, Remove Whitespace, Remove HTML Tags, Remove Punctuation.
Related tools
Frequently asked questions
What does the text cleaner do?
The text cleaner runs a selectable set of cleanup operations on your input in one pass. You can collapse extra spaces, remove line breaks, strip HTML tags, fix smart quotes and em-dashes, remove emoji, drop URLs and email addresses, normalize unicode, and 9 other operations. Each operation is a checkbox you turn on or off, so you control exactly what gets touched.
When should I use a preset instead of picking operations manually?
Use a preset when your text matches a common source: AI-pasted text from ChatGPT or Claude, a Word document copy, a PDF copy-paste, a code comment block, or a blog post draft. Each preset turns on the operations that source typically needs and leaves everything else off. You can always tick or untick individual operations after applying a preset.
What is the difference between a text cleaner and a remove line breaks tool?
A remove line breaks tool does one job: strip newline characters. The text cleaner is an umbrella tool that bundles 16 cleanup operations including remove line breaks, plus removing HTML, fixing quotes, dropping emoji, and 12 others. If you only need to remove line breaks, use the dedicated tool. If your text has several problems at once (typical for AI-generated or copy-pasted content), use this cleaner.
Does the cleaner change my original text?
No. The input box is what you paste in. The output box shows the cleaned result. Your original text on disk or in another app is never touched. Everything runs in the browser, and the input is held in memory only while the tab is open.
What is the order operations run in?
Operations run in a fixed order regardless of how you check them: remove HTML tags first, then drop URLs and emails, then remove emoji and non-ASCII, then convert smart quotes and em-dashes, then normalize unicode, then drop tabs, then remove line breaks, then collapse multiple spaces, then trim whitespace, then remove empty lines, then optional lowercase. This ordering prevents one operation from breaking another (for example, you do not want to lowercase before stripping HTML because tag names get lowercased pointlessly).
Why is "Remove punctuation" separate from "Convert smart quotes"?
Smart quote conversion is a fix: it replaces curly quotes and em-dashes with plain ASCII equivalents while keeping the punctuation in place. Remove punctuation is a delete: it strips all ASCII punctuation marks completely. Most cleanup workflows want the first (fix encoding) without the second (delete content), so they are two separate checkboxes.
What does "Normalize unicode (NFC)" actually do?
Some characters can be written two different ways. The letter é can be one code point (U+00E9) or two (U+0065 plus a combining accent U+0301). The NFC normalization rewrites both forms to the single-code-point version. This matters for search, deduplication, and database keys. Most text editors store NFC by default, but text pulled from clipboard pipelines (especially Mac to Windows) often arrives in the decomposed form.
I'm running multiple cleanup operations on internal documents and meeting notes. Does each pass send the document somewhere?
No. Every cleanup operation runs in your browser in sequence. The original document, the intermediate states between steps, and the final cleaned output all live in this tab. Nothing is sent to a server at any stage.
More wordcounter.ai tools
Other tools you might find useful.