In shortPaste your HTML and the checker lists errors and warnings with line numbers: unclosed, stray or mismatched tags, duplicate IDs and attributes, images without alt text, missing doctype, title, charset or viewport, and obsolete tags like <center> and <font>.
How to use the HTML validator
- Paste your HTML. Paste a page or snippet, or open an .html file. A sample with deliberate mistakes is loaded.
- Read the results. Errors, warnings and suggestions are listed with line numbers and update as you type.
- Jump to the problem. Click a line number to select that line in the code.
- Fix and re-check. Edit the code; use Format code to re-indent so unclosed tags are easier to spot.
What the checker looks for
| Level | Checks |
|---|---|
| error | Unclosed tags, stray closing tags, mismatched nesting, nested links, duplicate IDs, repeated attributes, <img> without src, missing doctype, title or charset |
| warning | Images without alt text, missing lang or viewport, obsolete tags (<center>, <font>, <marquee>…), block elements inside <p>, self-closed non-void tags, empty links, closing tags on void elements |
| info | Missing meta description, heading levels that skip, more than one <h1>, target="_blank" without rel="noopener", inline event handlers, heavy inline styles |
Optional closing tags are not errors
HTML lets you leave out some closing tags — </p>, </li>, </td>, </tr>, </option> and a few others — because the browser closes them automatically. The checker knows this and won't flag them. Void elements like <br>, <img> and <meta> never need closing.
This checker vs the W3C validator
The official W3C Nu validator checks every rule in the HTML specification, but it means sending your code to a server and wading through a long report. This checker runs instantly in your browser, never uploads your code, and focuses on the mistakes that actually break pages, hurt accessibility or harm SEO. For a final standards check before launch, run the page through validator.w3.org as well.
Clean up what it finds with the formatter and cleaner, or edit live in the online HTML editor.
Private by design: this tool runs entirely in your browser. Nothing you paste or open is uploaded to a server.
Frequently asked questions
How do I check my HTML code for errors?
Paste it into this page. Errors and warnings appear instantly with line numbers you can click to jump to the problem.
Why does it say a tag is never closed?
An element like <div>, <span> or <b> was opened but its closing tag is missing or comes after a parent closes. Format the code to see the nesting more clearly.
Is a missing </p> an error?
No. HTML allows omitting </p>, </li>, </td> and similar closing tags, so the checker doesn't flag them.
Does it check CSS and JavaScript?
No, it checks the HTML structure. Code inside <style> and <script> is skipped.
Is my code sent to a server?
No — unlike the W3C validator, this checker runs entirely in your browser.