HTML Fixer
Repair broken HTML online — fix unclosed tags, missing quotes, mismatched elements, and bad nesting.
What is HTML Fixer?
Got HTML that's mostly right but blowing up the page? An unclosed <p>, a stray </div>, or an href missing its quotes can throw the rest of the document into a strange parse state. The browser does its best with bad markup — but the result is rarely what you wanted. Paste it in here and we'll hand back something the parser is happy with, following the rules in the WHATWG HTML Living Standard.
It's aimed at the everyday breakages: a missing close tag, a quote that wasn't escaped, an attribute value missing its ", a list item that wasn't closed, a nested block element where it shouldn't be. The kind of thing the official W3C Validator flags one error at a time. The fixer reads the whole document at once and gives you a clean version you can drop straight back into your project.
Your markup is sent to the repair service over HTTPS and not retained. If you have inline secrets like API keys hard-coded in <code><script></code> or <code>data-*</code> attributes, redact those before pasting.
How to Use the HTML Fixer
Three steps. Works on partial fragments, full documents, or whatever weird mix you got back from a CMS export.
Paste Broken HTML or Load Sample
Drop your HTML into the left editor. Hit Sample HTML for a small order-confirmation page that has the typical mistakes — a <head> never closed, a list item without </li>, an unquoted href. Example of broken HTML:
<p>Your order <strong>SKU-101 ships tomorrow.
<ul>
<li>1 x Laptop Stand
<li>2 x USB-C Cable</li>
</ul>Three mistakes here: <strong> never closes, the first <li> isn't terminated, and there's no </p>. The fixer closes them in the right order.
Click Fix HTML!!
Hit the green Fix HTML!! button. We send your markup to the repair service which closes open elements per the HTML syntax rules, restores attribute quotes, and corrects nesting where it's clearly off. Your text content, classes, ids, and inline styles are left untouched.
Review Fixed Output
The right pane has the repaired HTML. Drop it into a browser, into our HTML Validator for a sanity check, or back into your CMS. For a deeper accessibility review use a dedicated a11y tool — that's a separate concern from syntax repair.
When You'd Actually Use This
Fix CMS or Email Template Output
WYSIWYG editors and email-template builders love to ship subtly broken markup — orphan <p> tags, missing alt attributes, the occasional unclosed <td>. Run the export through here once before you publish so the rendered page doesn't shift unexpectedly across browsers.
Salvage Markup Pasted from Office Apps
Word and Google Docs paste a tangle of <span>s and proprietary attributes that often have unbalanced tags or stray . The fixer cleans up the structure so you can keep editing the result instead of rewriting it from scratch.
Repair Hand-Written Components
Quick-and-dirty HTML snippets in a tutorial, a wiki page, or an old README — copy in, get it cleaned up, paste it where it needs to go. Useful for unblocking yourself when copy-pasting examples that worked in someone's blog post but not yours.
Sanitize Scraped Pages Before Parsing
When you're scraping HTML to feed into an extractor, broken markup throws off DOM-based parsers. Run pages through here first to give your parser a stable structure to work with. Pair with a real validator if you need strict conformance.
Common Questions
Is my HTML stored or shared?
The HTML you paste is sent to our backend over HTTPS to run the repair, and we don't retain it after the response is returned. There are no third-party trackers in the request path. That said, if your page contains hard-coded API keys, internal URLs, or analytics tokens, treat it like any other public paste — strip the sensitive values first.
What kinds of HTML errors does it actually fix?
Unclosed tags (<p>, <li>, <td>, <span>), mismatched closes, missing or unbalanced attribute quotes, malformed DOCTYPE, stray &/</> in text content that should be entities, and obvious nesting mistakes (block element inside an inline element). It does not invent missing content or rewrite valid markup.
Will it change my classes, ids, or inline styles?
No. The fixer is told explicitly to repair syntax only — class names, ids, inline style attributes, data-* attributes, and event handlers like onclick are passed through verbatim. If the output ever looks like one of those was modified, that's a bug.
Does it produce HTML5, XHTML, or both?
It targets HTML5 — that's what every current browser parses. Self-closing tags on void elements like <br /> are accepted on input but the output uses standard HTML5 form. If you specifically need strict XHTML output (rare today), use an XHTML-aware tool instead.
Why not just run my HTML through the W3C Validator?
You should, for the final pass — the W3C validator is the source of truth for what counts as valid HTML. But it shows errors one at a time and doesn't fix them. The fixer is for when you want the document closed up in one pass first; then you run the validator to confirm.
What about accessibility — does it add missing alt or ARIA?
No, and that's deliberate. ARIA roles and alt text are content decisions, not syntax decisions. Adding placeholder alt="" would mask a real accessibility problem. Run a dedicated a11y audit (axe, WAVE, Lighthouse) for those.
Other HTML Tools You Might Need
Fixing the syntax is just the start. Once it parses, these are useful next steps: