How it works
Every option below is an independent filter. Combine them freely — strip styles and classes while keeping tables and links, for instance.
"All tags" is a special case: it flattens the markup down to plain text, overriding every other option except non-breaking-space and empty-line cleanup.
- Tags with spaces
- Trims stray whitespace right after an opening tag and before a closing one.
- Empty lines
- Collapses runs of blank lines down to one.
- All attributes except href/src
- Strips id, class, style, data-* and the rest, keeping only links and sources.
- Span tags
- Removes <span> and <font> wrappers, keeping the text inside.
- Empty tags
- Removes tags with nothing inside — recursively, over several passes.
- Non-breaking spaces
- Replaces and the U+00A0 character with a plain space.
- Hidden AI characters
- Strips zero-width spaces, BOM, word joiners and soft hyphens; straightens smart quotes and dashes; drops data-* attributes left by AI chat interfaces.
- CSS styles
- Removes the style attribute and <style> tags.
- Empty attributes
- Strips attributes with no value, like alt="".
- Links
- Unwraps <a> tags, keeping the text without the link.
- Classes & IDs
- Removes class and id attributes.
- Tables
- Removes table, tr, td and other table tags entirely.
- Forms
- Removes form, input, select, button and other form elements.
- JS scripts
- Cuts out <script> and <noscript>, content included.
- Comments
- Removes HTML comments <!-- ... -->.
- Images
- Removes img, picture and figure tags.
- All tags
- Keeps text only, stripping all markup whatsoever.
Why clean your HTML
Consistent output
Word and Google Docs bury simple paragraphs under spans, styles and conditional comments. Stripping that noise gives every page the same clean markup.
Smaller pages
Removing unused classes, empty attributes and dead tags cuts kilobytes off every paste before it ever reaches your CMS.
Safer publishing
Scripts, forms and embedded styles from an untrusted source can break your layout or introduce risk. Clean them out before you publish.
Readable code
A tidy DOM is easier to audit, diff, and hand off to a designer or another developer.
Frequently asked questions
Does my HTML get uploaded anywhere?
Cleaning runs on this server for the duration of the request only — nothing is stored, logged, or shared. Once the response reaches your browser, the server keeps no copy.
Can I combine several cleaning options at once?
Yes — every option is an independent filter, so you can, for example, strip styles and classes while keeping tables and links.
What happens if I turn on "All tags"?
It overrides every other option except non-breaking-space and empty-line cleanup, and flattens the markup down to plain text.
Can I paste directly from Word or Google Docs?
Yes — paste into the left panel as usual. The tool captures the underlying markup, not just the plain text, so the cleaning options have something to work with.
How do I get plain text instead of HTML?
Use the Export text button in the top bar once you've cleaned your markup — it becomes active as soon as a result is ready and downloads the visible text as a .txt file.
What HTMLCleanup does — and why it exists
Copy a paragraph out of Word, Google Docs, or someone else's website and the markup that comes with it is rarely just text — it's nested spans, inline styles, leftover classes, empty tags, and formatting rules meant for a document that no longer exists once it lands in your CMS. HTMLCleanup exists to strip that noise back out, so the content you publish carries only the markup it actually needs.
It works as a two-sided editor: paste or type into the dirty side on the left, choose exactly which kinds of markup to remove using the filters above, and watch the clean result take shape on the right — as a live visual preview or as raw HTML you can copy, download, or export as plain text. Nothing you paste is uploaded anywhere or stored; the cleanup runs for the length of a single request and then it's gone.
Features
- 17 independent cleaning filters you can mix in any combination — from stripping inline styles to flattening everything down to plain text.
- A real WYSIWYG editor on both sides, so you see formatted content instead of a wall of raw tags while you work.
- Live visual preview and raw HTML source view for the cleaned result, side by side in one tool.
- One-click copy, .html download, or plain-text .txt export of the result.
- Native paste support for content copied from Word, Google Docs, or any webpage — including all of its usual markup mess.
- A full interface in five languages — English, Russian, Czech, Ukrainian, and Spanish.
- No sign-up, no account, no data stored — cleaning happens per request and nothing you paste is logged.
- A feedback form if you spot a bug or have a suggestion — it goes straight to the person maintaining the tool.