HTML Validator

Validate HTML structure. Check for unclosed tags, nesting errors, and missing attributes — all in your browser, no upload.

About the HTML Validator

This HTML validator runs entirely in your browser. Paste your HTML into the box above and click Validate to scan its tag structure. The tool tracks opening and closing tags on a stack, detects mismatches and unclosed tags, and flags void elements that incorrectly have closing tags — all with line numbers.

What it checks

  • Unclosed tags — Opening tags that are never closed are reported with the line where they opened.
  • Mismatched tags — A closing tag that doesn't match the most recent open tag is flagged.
  • Void elements — Elements like <img>, <br>, and <input> should not have closing tags; if they do, a warning is shown.
  • Self-closing tags — Tags written as <br /> are recognized and do not need a closing tag.

How to use the validator

  1. Paste your HTML into the input box.
  2. Click Validate to see errors and warnings, or Format to re-indent the markup.
  3. Read the result panel for a list of issues with line numbers.

Frequently asked questions

Does this tool upload my HTML? No. All checks happen locally in your browser.

Is this a spec-compliant HTML5 validator? No. It performs structural tag-stack checks. It does not validate against the HTML5 specification or check attribute rules, but it catches the most common structural mistakes.

Does formatting change my HTML meaning? Formatting only adjusts whitespace and indentation. Tags and text content are preserved.