Free online HTML cleaner — clean up & simplify HTML
HTML Washer is a free online HTML cleaner that strips scripts, CSS, and unnecessary markup from messy HTML
Paste HTML to clean it up
Settings
What exactly does it do?
- Fixes malformed HTML (unclosed tags, invalid nesting)
- Reduces the markup to:
<html lang>,<head>,<meta charset name content>,<title>,<body>,<p>,<blockquote cite>,<hr>,<figure>,<figcaption>,<a href title target>,<strong>,<em>,<b>,<i>,<s>,<u>,<br>,<h1>,<h2>,<h3>,<h4>,<h5>,<h6>,<img src alt width height loading>,<picture>,<source srcset sizes media type src>,<video src width height poster controls preload>,<audio src controls preload>,<table>,<caption>,<thead>,<tbody>,<tfoot>,<tr>,<th colspan rowspan>,<td colspan rowspan>,<col span>,<colgroup span>,<code>,<pre>,<ul>,<ol start type reversed>,<li>,<dl>,<dt>,<dd>,<abbr title>,<cite>,<dfn>,<kbd>,<samp>,<var>,<mark>,<small>,<q>,<wbr>,<del datetime cite>,<ins datetime cite>,<sub>,<sup>,<time datetime> - Replaces:
<strike>to<del>,<tt>to<code>,<acronym>to<abbr>,<dir>to<ul>,<listing>to<pre>,<xmp>to<pre>,<plaintext>to<pre> - Reformats the HTML (line breaks, indents)
Why use an HTML cleaner?
HTML copied from websites, CMS editors, or email templates often contains inline styles, unnecessary classes, and non-semantic tags that bloat the markup. An HTML cleaner strips this clutter and returns clean HTML with only the essential semantic elements — paragraphs, headings, lists, links, and images.
When to clean up HTML
- Migrating content between platforms — clean up HTML before pasting it into a new CMS or website builder
- Preparing HTML for React, Vue, or other frontend frameworks that expect minimal, well-structured markup
- Fixing messy HTML from WYSIWYG editors that inject excessive inline styles and empty spans
- Reducing page weight by removing scripts, CSS, and attributes that slow down rendering
How HTML cleanup works
Paste your HTML and the cleaner fixes malformed tags, removes scripts and stylesheets, strips inline styles and class attributes, and reduces the markup to basic semantic elements. The result is clean, valid HTML ready to use anywhere. You can choose between minified output or formatted output with proper indentation.