HTML Validator: Unclosed Tags, Bad Nesting and Duplicate IDs

A rule-based HTML checker that lists common markup mistakes with line numbers, labelled as errors or items to review.

Use the tool

Why this tool exists

Browsers repair broken markup silently, so mistakes survive until a layout breaks. This tool reads the HTML with a small tokenizer and reports what a browser would repair: tags never closed, end tags with no start, a div inside a p (which the browser splits), links inside links, li outside lists, duplicate ids and attributes, obsolete tags and missing basics.

It is not the W3C validator. It does not check attribute values, ARIA or every content-model rule. Use it for quick feedback, then run a full validator for a formal result.

How to use it

  1. Paste your HTML.
  2. Read the list with line numbers.
  3. Fix errors first, then review items.
  4. Run again until clean.

Frequently asked questions

Is this a full validator?

No. It checks common structural mistakes. Use the W3C Nu validator for a formal result.

Why is a div inside p flagged?

The p end tag is optional, so browsers close the paragraph at the div and the tree differs from your source.

Are partial snippets ok?

Yes. Document checks such as doctype and title only run when the text contains an html element.