HTML Validator

Find unclosed, mismatched and stray tags in HTML, each reported with its line and column.

HTML
Result
Runs locally in your browser

About the HTML Validator

Browsers repair broken HTML silently, which is why a missing closing <div> can push a footer into the wrong place with no error anywhere. This validator walks the tag structure and reports what a browser would have had to guess about: elements that are never closed, closing tags with no matching opener, closing tags on void elements such as <br> and <img>, and attribute values that contain an unescaped angle bracket.

Elements that HTML permits to be left open, such as <p>, <li>, <td> and <option>, are not reported, so real omissions stand out. The contents of <script> and <style> are skipped since they are not HTML. When no problems are found, a short profile lists element count, title, images without alt text, links, forms, and whether a doctype and lang attribute are present.

This is a structural check, not a full conformance check against the WHATWG standard; it does not know that a <div> inside a <span> is disallowed. For that level of detail, the W3C validator is the reference. Most everyday breakage, though, is a tag mismatch, which is exactly what this finds. Format the result with the HTML Formatter once it is clean.

How to use

  1. Paste the HTML or upload a file.
  2. Read the list of problems with line and column numbers.
  3. Fix each one in the left pane; the list updates as you type.

Common questions

Why are unclosed p tags not reported?
HTML allows a p element to end when the next block starts, so browsers handle it consistently. Reporting it would bury the real problems.
Does it check attribute names or ARIA roles?
No. It checks tag structure and quoting. Accessibility checks such as missing alt text are summarised in the profile.
Can it validate a fragment without html and body?
Yes. Fragments are checked as they are; no wrapper is required.
Are template tags like {{ x }} a problem?
No. Text outside of tags is ignored, so template syntax passes through.