HTML Validator & Checker
An HTML validator checks your markup for mistakes that browsers quietly cover up: unclosed tags, elements in the wrong place, duplicate IDs, missing alt text and obsolete code. Paste your HTML to get an instant line-by-line report right in your browser, or send it to the official W3C checker for a full standards check.
How to validate HTML
- Add your code. Paste HTML into the left panel, upload an
.htmlfile, or press Sample to load a page with a few mistakes in it. - Read the report. The instant check runs as you type and lists every problem with its line and column, sorted top to bottom.
- Jump to each problem. Click any item to select that line in your code. Line numbers with errors are marked in red, warnings in amber.
- Get the official verdict. Press Run W3C check to test the same code against the full HTML standard with W3C’s own validator.
Instant check vs. W3C check
| Instant check | W3C check | |
|---|---|---|
| Where it runs | In your browser | On W3C’s Nu Html Checker (validator.w3.org) |
| Privacy | Your code never leaves your device | Your code is sent to W3C’s servers |
| Speed | Updates as you type | A second or two per check |
| What it covers | 50+ of the mistakes behind most real-world bugs, explained in plain English | Every rule in the HTML standard, in W3C’s own (more technical) wording |
| Best for | Checking as you write | A final pass before you publish |
What the instant check looks for
Structure
Unclosed and mismatched tags, stray end tags, end tags on void elements like </br>, /> on elements that can’t self-close, unclosed comments, and a missing doctype or <title>.
Nesting
Block elements inside <p>, <span> or headings, links inside links, buttons inside links, nested forms, <li> outside a list and table cells outside a row.
Attributes
Duplicate attributes, missing spaces between attributes, quotes that never close, duplicate or empty IDs, width values with units, spaces in URLs and made-up input types.
Accessibility
Images without alt text, iframes without a title, labels pointing at IDs that don’t exist, and a missing lang on <html>.
Outdated code
Obsolete elements like <center>, <font> and <marquee>, and obsolete attributes like align, bgcolor and cellpadding.
Text and metadata
Character references like © missing their semicolon, bare < signs in text, and a missing charset or viewport tag.
Errors, warnings and notices
Errors break the rules of the HTML standard. Browsers still try to show the page, but each one guesses at what you meant in its own way, and that’s where layout bugs, broken scripts and content that silently disappears come from. Fix these first.
Warnings are code that technically works but is outdated or likely to cause trouble later, like obsolete attributes, a missing lang or a label that doesn’t point at anything.
Notices are suggestions about style and good habits. Ignoring them won’t break anything.
Related tools and references
Frequently asked questions
Is this HTML validator free?
Is the instant check as thorough as the W3C validator?
Can I check a snippet instead of a full page?
<html>, <head> or <body>, the instant check skips whole-page checks like the missing <title>. The W3C check wraps snippets in a minimal page before sending them, so you only see problems in your own code.Why does my page work even though it has errors?
<div> can look fine in one browser and push your footer into the sidebar in another, and screen readers and search engines can read the same mistake differently again.Does valid HTML help SEO?
<title> in the wrong place, a quote that never closes, or an unclosed element swallowing the content after it, can stop search engines from seeing the page the way you meant.