HTML Validator
Check HTML markup for structural problems — unclosed and mismatched tags, duplicate IDs, deprecated elements, missing required attributes (img alt/src, a href), and block-inside-inline nesting — with a per-issue list of line numbers. A lightweight structural linter that runs entirely in your browser.
Input
Output
Summary
| Metric | Value |
|---|---|
| No data yet | |
Issues
| Severity | Line | Column | Message |
|---|---|---|---|
| No data yet | |||
Guides
Paste any HTML markup and get an instant, line-by-line report of structural problems — unclosed tags, mismatched closing tags, duplicate IDs, deprecated elements, missing required attributes, and invalid nesting. The HTML Validator is a lightweight structural linter that runs entirely in your browser, so nothing you paste ever leaves your device.
How to use it
- Paste or type your HTML into the input box (a full document or a fragment both work).
- The tool validates as you type — no button to press.
- Read the Summary table for an at-a-glance verdict (valid, valid with warnings, or invalid) plus error and warning counts.
- Scan the Issues table for each problem, with its severity, line number, column, and a plain-English message. Copy or download the list as CSV to share with your team.
What it checks
- Unclosed tags — an element opened but never closed, or left open when its parent closes.
- Mismatched / unexpected closing tags — a
</tag>with no matching open tag, or tags closed out of order (e.g.<b>...<i>...</b></i>). - Duplicate IDs — the same
idvalue used on more than one element, which breaks anchors, labels, and scripting. - Deprecated elements — legacy tags such as
<center>,<font>,<marquee>,<big>, and<strike>that are no longer part of HTML. - Missing required attributes —
<img>withoutaltorsrc,<a>withouthref,<script>withoutsrc(inline scripts are exempt), and<link>withouthref. - Block-inside-inline nesting — a block element like
<div>placed inside an inline element like<span>. - Self-closing syntax on non-void elements and closing tags on void elements like
<br>or<img>. - Missing document scaffolding — a full page without
<!DOCTYPE html>,<html>,<head>, or<body>.
Is this a full W3C validator?
No. This is a lightweight structural linter, not a complete implementation of the W3C/WHATWG HTML specification. It catches the common, high-impact mistakes that break rendering, accessibility, and scripting — the ones you actually hit day to day — using a fast regex-and-stack tokenizer. For exhaustive spec conformance (content models, ARIA rules, character encoding), run your markup through the official W3C Markup Validation Service.
Does my HTML get uploaded anywhere?
No. All validation happens locally in your browser via pure JavaScript. Your markup is never sent to a server, which makes the tool safe for private templates, email HTML, and unpublished pages.
What do "error" and "warning" mean?
Errors are structural faults that will affect how a browser parses your document — unclosed tags, duplicate IDs, missing src/alt/href. Warnings are best-practice issues that usually still render — deprecated elements, missing doctype, or block-in-inline nesting. Aim to clear all errors first, then review warnings.
Can I validate just a snippet?
Yes. Paste a fragment and the tool still reports tag and attribute issues. You will see warnings about a missing doctype and <html>/<head>/<body> — ignore those when you are intentionally checking a partial template.