Paste HTML code, or copy straight from a web page or ChatGPT, and get clean HTML back. Inline styles, classes, comments and empty tags go; headings, lists, links and tables stay. Below the result you see exactly what was removed.
The cleaner takes away the markup that only made the HTML look a certain way somewhere else, and leaves the markup that says what the content is.
style attributes and the old formatting attributes (align, bgcolor, width on tables), classes, data- attributes, comments, scripts, style blocks, span and font tags (their text stays), and tags with nothing in them. Non-breaking spaces ( ) become normal spaces.href, rel and target, images with their alt text, tables, code blocks, lang and aria attributes.<strong> and <em> before the styles go, so no emphasis is lost.Every box can be unticked. The count under the result tells you how many of each kind were removed, and the before and after view shows the two versions side by side.
<!-- wp:paragraph -->, wp-block classes and wrapper divs around everything. Clean them off before you move a post to another site.data-start and data-end on every tag, and bold written as a styled span around a <strong>.bgcolor, cellpadding and <font> tags, which you do not want on a web page.Copying from Word or Google Docs? Word to HTML also rebuilds Word's bullet lists. Want every tag gone and only the text left? Use Strip HTML instead, or HTML to Text to keep links and tables readable.
The HTML is parsed by your browser's own parser (DOMParser), so broken markup is repaired the way a browser repairs it. That is also why a table always comes back with a <tbody>: the browser adds one, and the result shows what the browser actually builds. Nothing in the HTML is run, and the before and after view is drawn in a sandboxed frame that loads no images or scripts.
It removes what you tick rather than keeping a short list of what it knows, so attributes it has never heard of stay. Event handlers such as onclick and javascript: links always go. SVG keeps its styles and IDs, because gradients and clip paths depend on them, and <pre> keeps its spacing. A whole page comes back as the content of its <body>. The output is indented one block per line, and nothing is uploaded: the work happens in your browser.
Strip HTML takes every tag away and leaves plain text. The HTML Cleaner keeps the HTML and takes away the clutter around it: styles, classes, comments, empty tags. Use Strip HTML when you want words, and this page when you want markup you can paste into a CMS, a template or a code editor.
Paste the HTML and leave Inline styles and old formatting ticked. Every style attribute goes, and so do the attributes that did the same job before CSS: align, bgcolor, border, cellpadding and width on tables. Bold and italic that only existed as a style are turned into real <strong> and <em> tags first, so they are not lost with the styles.
Yes. Copy the answer, paste it here, and the page takes the HTML behind it rather than the plain words. ChatGPT puts data-start and data-end on every tag and writes bold as a styled span around a <strong>; the data attributes go, and the doubled bold becomes one <strong>.
They are comments, so they go when Comments is ticked: <!-- wp:paragraph --> and the rest. The wp-block classes go with the classes, and the wrapper divs that are left with nothing on them are removed, while the headings, paragraphs and images inside them stay.
Because the HTML is read by your browser's own parser, and a browser always puts the rows of a table inside a <tbody>, whether or not it was written. The result shows the table the way browsers actually build it. It changes nothing about how the table looks.
Mostly, as a side effect. Tags that were never closed are closed, and tags in the wrong order are put right, the way a browser would read them. It is not a validator, though: it does not list errors, it just hands back the HTML as a browser understands it.
No. The cleaning happens in your browser, and nothing is sent to this server or anywhere else. The before and after view is drawn in a sandboxed frame that is not allowed to run scripts or load images, so even the original HTML cannot call home while you look at it.