Paste HTML to validate
Errors, warnings and hints appear here β or enable Live validate// validate HTML and catch errors instantly
Validate HTML and catch errors instantly: unclosed tags, missing attributes, deprecated elements, nesting mistakes, accessibility warnings. Browser-based, free, no sign-up.
Paste HTML to validate
Errors, warnings and hints appear here β or enable Live validatePaste any HTML β a full page, a template, a component, or a snippet. The validator works on both complete documents and fragments.
Each issue shows the line number, severity (error, warning, hint), and a clear description. Click an issue to jump to the corresponding line in the editor.
Use the filter tabs to focus on errors only, accessibility warnings, or informational hints. The gutter markers on the left side show which lines have issues.
HTML Validator parses your HTML and checks it against a comprehensive rule set covering syntax errors, attribute requirements, deprecated elements, document structure, and accessibility best practices. All validation runs in your browser β no data is sent anywhere, completely free.
The validator checks for: unclosed and mismatched tags; self-closing syntax on non-void elements; missing required attributes like alt on images and lang on <html>; deprecated elements like <font>, <center>, and <marquee>; structural issues like a missing DOCTYPE declaration; empty required attributes; and accessibility issues like images without alt text, form inputs without labels, and buttons without accessible names.
An error means the HTML is definitively invalid β it violates the HTML specification in a way that could cause browsers to parse the document differently or produce unexpected results. A warning means the HTML is technically valid but contains a practice that is likely to cause problems β such as a deprecated element that still works but should be replaced. A hint is an informational note about a best practice, accessibility improvement, or minor issue that should be reviewed but may be intentional.
The alt attribute on <img> elements is required by the HTML specification for all images that are not purely decorative. It provides text for screen readers, displays when the image fails to load, and is used by search engines to understand image content. Decorative images should have an empty alt attribute (alt="") rather than no alt attribute at all. Both missing and empty alt are detected but with different severities.
Deprecated elements are HTML tags that were valid in older HTML versions but have been removed from the HTML living standard. Common examples include <font> (replaced by CSS), <center> (replaced by CSS text-align or flexbox), <marquee> (no CSS equivalent, but should be avoided), <strike> (replaced by <s> or CSS), and <tt> (replaced by <code>). Browsers still render them, but they should be replaced with modern equivalents.
Yes, when the "Accessibility checks" option is enabled. Accessibility checks look for: images without alt text; form inputs without associated labels; buttons and links without accessible names; headings skipping levels (e.g. jumping from h1 to h3); iframes without titles; and autoplay media without controls. These checks follow WCAG 2.1 level AA guidelines where applicable.
This is a client-side approximation of HTML validation, not the official W3C Nu HTML Checker. It catches the most common and impactful HTML issues in the browser without making a network request. For full specification-level validation of a production site, the W3C Nu HTML Checker at validator.w3.org is the authoritative tool. This tool is ideal for quick checks, live validation as you type, and catching obvious issues without leaving your workflow.
HTML errors are silent: browsers are extremely forgiving parsers and will render a page even when the markup is broken. An unclosed tag, a mismatched element, or a missing required attribute rarely crashes a page β but it can cause subtle rendering differences across browsers, break screen readers, prevent search engines from correctly indexing content, and make the page fail automated accessibility audits. A validator surfaces these issues before they reach users.
The most frequent HTML errors fall into a few categories. Unclosed tags β opening a <div> or <p> without a corresponding closing tag β cause the browser to infer the structure, sometimes producing very different rendering than intended. Mismatched tags β closing a <div> inside a <span> that is itself inside a <div> β create nesting that does not match the visual hierarchy. Missing required attributes β an image without alt, a form input without a name, a document without lang β violate the specification and harm accessibility.
Accessibility issues in HTML often go unnoticed during development because they do not affect the visual appearance of a page. A screen reader user, however, may encounter a blank page of content when images have no alt text, form fields with no labels, interactive elements with no keyboard focus, or heading structures that skip levels. The accessibility checks in this validator catch the most impactful WCAG 2.1 violations at the HTML level β before CSS and JavaScript add further complexity.
Legacy HTML codebases often contain elements from HTML4 and XHTML that have since been removed from the living HTML standard. <font> was replaced by CSS font properties. <center> was replaced by CSS text-align and flexbox. <strike> was replaced by <s> or <del>. <frame> and <frameset> were replaced by iframes and server-side includes. While browsers still render these elements, code that uses them should be updated β especially for projects targeting modern standards or undergoing accessibility audits.
A valid HTML document requires a <!DOCTYPE html> declaration on the first line, a <html> root element with a lang attribute, a <head> element containing at minimum a <title> and a charset declaration, and a <body> element. The validator checks for all of these structural requirements and flags missing or misplaced structural elements as warnings.