HTML Validator
Check your HTML for errors, accessibility problems and missing essentials — with a fix for each one.
HTML to check
Results
2 errors, 6 warnings, 2 suggestions.
Runs locally in your browser. This is not the official W3C validator.
How to validate HTML
- Paste your HTML, or open or drop an .html file.
- Results appear instantly, grouped as errors, warnings and suggestions, each with its line and column.
- Click a result to jump to that line in the code, then apply the suggested fix.
What this HTML checker looks for
- Structure: unclosed elements, stray end tags, misnested tags, links inside links, nested forms and self-closing
<div/>tags. - Uniqueness: duplicate
idvalues and duplicate attributes on the same element. - Accessibility: images without alt text, inputs without labels, empty links and buttons, iframes without a title.
- Document essentials: doctype,
lang, title, character encoding, viewport and meta description. - Obsolete markup: elements like
<center>,<font>and<marquee>, with modern replacements.
The checker understands HTML's optional end tags, so valid shortcuts such as leaving out </li> or </p> are not reported as errors.
Example: fixing misnested tags
Browsers silently repair broken markup, so a page can look fine while its structure is wrong — which then breaks styling, scripts and screen readers in hard-to-debug ways. The validator reports the <strong> below as not closed before </p>:
<p>Read the <strong>terms</p></strong><p>Read the <strong>terms</strong></p>How it compares to the W3C validator
This is an independent HTML syntax checker, not the official W3C Markup Validation Service. It runs in your browser, so your code is never uploaded, and it explains every problem in plain language with a fix. For a full specification-conformance report of a published page, you can additionally run the W3C validator.
Related HTML tools
Hard to see the structure? Indent the code first with the HTML formatter, then fix issues live in the online HTML editor while watching the preview. When everything passes, shrink the page with the HTML minifier or check the rendering in the HTML viewer.
Frequently asked questions
- Is this the official W3C validator?
- No. This checker runs locally in your browser and focuses on the mistakes people make most: unclosed and mismatched tags, duplicate IDs, missing alt text, missing labels and missing document essentials. For full specification conformance you can additionally use the W3C Markup Validation Service.
- What does the HTML validator check?
- Structure (unclosed, stray and misnested tags, duplicate IDs and attributes), accessibility (missing alt text, labels, link and button text, iframe titles), document basics (doctype, lang, title, charset, viewport) and obsolete elements such as <center> and <font>.
- Why isn't a missing </p> or </li> reported?
- Because it is valid. HTML allows the end tags of elements such as <p>, <li>, <td> and <tr> to be omitted; the browser closes them automatically. The validator follows those rules, so it only reports real problems.
- What is the difference between errors, warnings and suggestions?
- Errors are invalid markup that browsers have to guess how to repair. Warnings are valid but cause real problems, often for accessibility. Suggestions are best practices, such as a logical heading order.
- Can I check a snippet instead of a whole page?
- Yes. When you paste a fragment without <html>, <head> or <body>, document checks like doctype and title are skipped and only the snippet itself is checked.