Skip to main content

Free online HTML cleaner — clean up & simplify HTML

HTML Washer applies your chosen cleanup preset to pasted, uploaded, or fetched HTML.

Paste HTML to clean it up

Settings

Processing mode

Headings, tables, lists, code blocks, b/i/s formatting

Includes images, video/audio, figures, blockquotes

Includes structural HTML5, details/summary, divs/spans

Includes CSS classes, style attributes, and <style> tags

Normalize HTML without cleanup

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)

How to use HTML Washer

  • Paste your HTML into the homepage and press the Wash button
  • Or upload a file directly
  • Download or copy the cleaned result
  • Check the full help guide for details on wash modes and options

How HTML became the web's markup

HTML's markup ancestry runs through SGML to IBM's GML, which three engineers developed in 1969 and named with their initials. Tim Berners-Lee proposed the web at CERN in 1989 and implemented HTML as part of it in 1990. Browser competition, XHTML, the W3C/WHATWG split, HTML5 and Flash's retirement explain why its history includes arguments about compatibility as well as new tags.

Related

Check out our Apify actor for web scraping.

Powered by Trafilatura Core, an open-source content-extraction engine that pulls the main content from web pages while filtering out boilerplate like navigation, ads, and sidebars.

Ideal for building RAG pipelines, training datasets, or content analysis at scale.


Did you know? Apify offers a free tier — you get $5 to use monthly.


Apify also has a super generous Creator plan (though you can run only your own actors) that costs just $1/month (billed $6 semi-annually) and includes a one-time $500 platform credit for your first 6 months — with up to 32 GB RAM and 32 concurrent actor runs.