HTML Validator

Paste an HTML document or snippet and see every syntax error, unclosed tag, and nesting issue — each with its line and column. Runs entirely in your browser; nothing is uploaded.

Try:
Validation report

Catch broken markup before it ships

Missing a single </div> or crossing two tags can push a whole layout off, break a component, or confuse a scraper — and the browser silently "fixes" it, so the mistake never shows up until something downstream breaks. This validator scans your HTML and reports exactly what is wrong and where, so you can fix it at the source.

Paste a full page or a single snippet, and every issue comes back with its line and column and a plain-language explanation of what was expected.

What it checks

It understands void elements (br, img, hr, input, meta, link, …) that never take a closing tag, self-closing tags (<hr/>), quoted attribute values (so a > inside alt="a > b" is safe), and the raw contents of <script>, <style>, <textarea>, and <pre> — a < inside JavaScript or text is not treated as a tag.

Worked example

Input:

<div><p>Hello<span>world</div>

Report:

Invalid HTML: 3 error(s), 0 warning(s) in 0 element(s).

  error   line 1:6   `<p>` (opened at line 1:6) is not closed before `</div>` — overlapping/misnested tags
  error   line 1:14  `<span>` (opened at line 1:14) is not closed before `</div>` — overlapping/misnested tags
  error   line 1:1   `<div>` is never closed with `</div>`

Output formats

Choose report for a readable, line-numbered issue list, or json for a machine-readable { valid, errors, warnings, elements, issues[] } object you can drop into a test, a CI check, or an editor plugin. Each issues[] entry carries severity, line, column, and message.

Privacy

Everything runs locally in your browser through WebAssembly. Your HTML is never uploaded to a server.

FAQ

Is this the same as the W3C validator?

No. The W3C Nu checker validates conformance to the full living HTML standard — attribute whitelists, ARIA rules, duplicate ids, and more — against a live schema. This tool is a fast, local structural validator focused on the mistakes that actually break rendering: unclosed tags, misnested tags, and raw syntax errors. It never uploads your markup.

What is the difference between an error and a warning?

An error means the markup is structurally broken — an unclosed tag, a misnested pair, a stray closing tag, or an unterminated tag/comment. A warning flags something that is technically tolerated but wrong, such as a closing tag on a void element (</br>). The document is reported as valid only when there are no errors.

Does a `<` inside my JavaScript or text cause false errors?

No. The scanner treats the contents of <script>, <style>, <textarea>, and <pre> as raw text, and a < that is not followed by a letter, /, !, or ? (like a < b) is read as plain text — not a tag. Quoted attribute values containing > are handled too.

Can I validate a fragment instead of a whole page?

Yes. You can paste a single component, a table row, or one <div> — you do not need a <!DOCTYPE html> or <html> wrapper. The validator only reports on the tags you give it.

What are the limits?

This is a structural/syntax validator, not a full HTML conformance checker: it does not verify attribute names, required attributes (like alt), accessibility rules, or CSS. It also does not auto-correct — it reports issues so you can fix them at the source. Line and column are 1-based.

Developer & Automation Access

Run it from the terminal

Same engine as this page, headless — via the gizza CLI:

gizza tool html-validate "<div><p>Hello<span>world</div></p>"

New to the CLI? Get gizza →

Open it by URL

Pre-fill and auto-run this tool with query parameters — the names match the API/CLI:

https://gizza.ai/tools/html-validate/?html=%3Cdiv%3E%3Cp%3EHello%3Cspan%3Eworld%3C%2Fdiv%3E%3C%2Fp%3E&format=report

Machine-readable descriptor: tool.json — title + parameters JSON Schema for agents.