Messy code? Format it first →
Your HTML
Click any problem to jump to its line. Ctrl + Enter re-checks. Fix it in the full editor with live preview →

How to validate HTML

  1. Add your code. Paste HTML into the left panel, upload an .html file, or press Sample to load a page with a few mistakes in it.
  2. Read the report. The instant check runs as you type and lists every problem with its line and column, sorted top to bottom.
  3. 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.
  4. 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 checkW3C check
Where it runsIn your browserOn W3C’s Nu Html Checker (validator.w3.org)
PrivacyYour code never leaves your deviceYour code is sent to W3C’s servers
SpeedUpdates as you typeA second or two per check
What it covers50+ of the mistakes behind most real-world bugs, explained in plain EnglishEvery rule in the HTML standard, in W3C’s own (more technical) wording
Best forChecking as you writeA 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 &copy 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?
Yes, with no account needed. The instant check has no limits at all. The W3C check uses W3C's free public service, which asks people not to send heavy automated traffic, so it's best for occasional checks by hand.
Is the instant check as thorough as the W3C validator?
No, and it isn't trying to be. It catches the mistakes that cause most real bugs and explains them in plain English, instantly and privately. The W3C check tests against the whole specification. Use both: the instant check while you work, and W3C before you publish.
Can I check a snippet instead of a full page?
Yes. If your code has no doctype, <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?
Browsers are built to recover from broken HTML instead of refusing to show it. The catch is that every recovery is a guess. An unclosed <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?
Indirectly. Google has said that passing validation isn't a ranking factor on its own. But errors that change how a page is read, like a <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.