HTML Tag Validator
Check markup for unclosed, mismatched and misplaced tags before a browser guesses for you.
What is Tag Validator?
A structural HTML checker. Browsers recover from broken markup silently — and differently — so a missing end tag can look fine locally and break a layout in production. This tool parses the document the way the HTML specification says to and reports what it had to repair.
How it works
The source is tokenised and parsed with the HTML optional-end-tag rules, so <li>, <p> and <td> may close implicitly. Every repair is recorded as a finding with a severity: an unclosed tag, a stray end tag, an end tag on a void element or a duplicate attribute, each with the tag it applies to. The reformatted markup underneath is produced by the same parser, so what you see is what it understood.
- Paste the source. Drop in code, a stylesheet, a query or a selector list. Everything is read locally — the page never uploads what you paste.
- Choose the options. Indent width, quote style, keyword case or target browsers. The result updates as you change them, so you can see the effect immediately.
- Copy or download. Copy the result to the clipboard or download it as a file. Reset clears the form and returns every option to its default.
Examples
A template that only breaks in one browser
An unclosed <div> inside a table row is repaired differently by different engines; the findings list shows exactly where the repair happened so you can fix the source instead.
Cleaning up hand-written email markup
Mail clients are the least forgiving HTML renderers there are, so running the markup through the checker first avoids the classic lost-closing-tag layout collapse.
Common mistakes
Expecting a formatter to fix invalid code
Formatting is whitespace and quoting. A missing brace, an unclosed tag or an unquoted variable survives the round trip and is reported instead — check the findings list.
Minifying without running the tests afterwards
Even a safe, non-mangling minifier can expose an existing automatic-semicolon-insertion bug. The JavaScript Minifier keeps the newlines that matter, but re-run your tests before shipping.
Treating a rewritten query as verified
The SQL Dialect Converter translates the syntax it can prove; data types, casts and function differences are listed for review, not guessed. Run the converted query against a real database.
Renaming or reformatting generated files
Regenerating a formatter's output is a no-op only if the formatter is the same one that produced it. Keep generated code out of the round trip and format the source it came from.
Frequently asked questions
Does a clean report mean my HTML is valid?
No. This check covers structure: whether tags are balanced, nested legally for the common container elements, and free of duplicate attributes. It does not implement the full HTML content model, so a <div> inside a <p> is reported as an implicit close (which is what browsers do) rather than as a conformance error. Use the W3C validator when you need standards conformance.
Why is a missing </li> only a warning?
Because the HTML specification lets a list item close when the next <li> starts, so that markup is well defined and renders identically everywhere. It is still worth knowing about: an implicit close is usually an accident, and it can hide a genuinely unclosed element further down.
Can it check a whole page from a URL?
No. Nothing is fetched or uploaded — paste the markup (view source, or the HTML tab of your dev tools) and it is parsed in the browser. That keeps it usable on internal pages and on work that cannot leave your machine.