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.

Text Cleaner Line Break Remover Delete Spaces Delete Empty Lines soon Strip Whitespace soon
Input Reset sample

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.

AI-pasted text (ChatGPT, Claude, Gemini)
AI outputs carry em-dashes, curly quotes, ellipsis characters, emoji, and stray non-breaking spaces. Drop the text in, click the AI-pasted preset, and you get plain ASCII with normal punctuation that paste cleanly into any CMS or doc.
Word and Google Docs copy
Word document copy-paste brings smart quotes, em-dashes, and sometimes invisible track-changes markup. The Word preset fixes the encoding without touching content.
PDF copy-paste
PDFs hard-wrap lines at page width and often add stray spaces between letters. The PDF preset removes the wrap line breaks, collapses extra spaces, and trims per-line whitespace.
HTML pages and emails
Pasting from a rendered web page or an HTML email can drag tags along. Tick Remove HTML tags to strip them and keep just the readable text. Combine with Remove URLs to also drop link addresses.
CSV and data prep
Data exports often contain tabs, embedded newlines inside quoted fields, and stray non-ASCII characters from regional sources. Combine Remove tabs, Remove line breaks, and Normalize unicode to get a clean row-per-line file ready for re-import.
Code comments and docstrings
Block comments wrapped to 80 columns get hard to refactor when you rewrap to 100 or 120. The Code comment preset removes line breaks, collapses spaces, and leaves punctuation alone.
Search and database keys
Building a search key or a database lookup needs canonical form. Normalize unicode + Lowercase + Remove punctuation gives you a comparable key that matches across input variants.
Social and bio fields
Many social profiles strip emoji or non-ASCII silently. Run Remove emoji and Remove non-ASCII before pasting so you see exactly what the platform will store.

What each preset actually does

The five presets each tick a specific set of operations. Use them as starting points and tweak from there.

AI-pasted text cleanup
  • Smart quotes to straight
  • Em-dashes to hyphens
  • Remove emoji
  • Collapse multiple spaces
  • Remove empty lines
  • Trim whitespace
  • Normalize unicode (NFC)
Use when pasting from ChatGPT, Claude, Gemini, Perplexity, or any LLM output.
Word document copy
  • Smart quotes to straight
  • Em-dashes to hyphens
  • Collapse multiple spaces
  • Trim whitespace
  • Normalize unicode (NFC)
Use when pasting from Microsoft Word, Google Docs, or Pages into a plain-text destination.
PDF copy-paste
  • Remove line breaks (joins wrap)
  • Collapse multiple spaces
  • Trim whitespace
  • Smart quotes to straight
  • Remove empty lines
Use after copying a paragraph or page out of a PDF reader. Joins ragged lines back into clean prose.
Code comment cleanup
  • Remove line breaks (rewrap target)
  • Collapse multiple spaces
  • Remove tabs
  • Trim whitespace
Use when refactoring a long block comment to a new column width. Strip the old wrap, then re-wrap in your editor.
Blog post draft
  • Remove HTML tags
  • Smart quotes to straight
  • Em-dashes to hyphens
  • Collapse multiple spaces
  • Remove empty lines
  • Trim whitespace
Use when moving a draft between a CMS preview, a notes app, and a final word-processor for proofreading.

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.

OperationEffectDefault
Collapse multiple spacesReplaces runs of two or more spaces with one.On
Remove line breaksStrips all newlines. Paragraphs flatten into one line.Off
Remove empty linesDrops blank lines but keeps one as a paragraph separator.On
Trim whitespaceStrips leading and trailing space on each line.On
Remove tabsStrips tab characters.Off
Remove HTML tagsStrips tags, keeps text inside. Use the dedicated HTML tag remover for finer control.Off
Remove numbersStrips digits 0 to 9.Off
Remove punctuationStrips ASCII punctuation marks.Off
Remove non-ASCII charsStrips all characters above code point 127. Accents, symbols, foreign scripts.Off
Remove emojiDrops emoji and pictographs.Off
Remove URLsDrops http and https links.Off
Remove email addressesDrops user@host patterns.Off
Smart quotes to straightReplaces “”‘’ with " and '.On
Em-dashes to hyphensReplaces and with -.On
Normalize unicode (NFC)Combines decomposed accent sequences into single code points.Off
Lowercase everythingA 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.

Browse the full catalog →