HTML validator
Paste HTML and see every mistake with its line and a plain fix.
PrivateNo uploadsRuns in your browserChecking…
Reading 19 lines
Problems
Errors break the page. Warnings may misbehave. Tips make it better. Tap one to see it in the code.
How to check HTML for errors
Paste or open your HTML
Paste a page or a snippet, open an .html file, or try a sample. The check runs as you type.
Read the list
Each problem shows its line and column, what is wrong and how to fix it. Tap one to jump to it in the editor.
Fix and save
Press Fix what can be fixed safely, look over the changes, then apply them. Copy or download the clean HTML.
Good to know
- Errors break the page or confuse browsers. Warnings work today but may misbehave. Tips make the page better for everyone.
- A <div> or list inside a <p> ends the paragraph early. Use a <div> as the outer box instead.
- Close tags in the reverse order you open them: <b><i>text</i></b>.
- Every picture needs alt text. Use alt="" only for pure decoration.
- Snippets are fine: page-level checks such as doctype and title only run when the code has <html>, <head> or <body>.
Where people use it
Page looks broken
Find the unclosed tag or wrong nesting that breaks the layout.
Student web projects
Check the page before you submit and learn from the plain fix for each problem.
Better for screen readers
Catch missing alt text, lang and labels that point nowhere.
Check the styles
Check the CSS file for typos and bad values.
CSS validatorEdit with a preview
Fix the code and watch the page update.
HTML editor, formatter and live preview
Why this one
Every problem comes with a plain English fix, and safe fixes can be applied in one click.
- Line number and a plain fix for every problem.
- One-click safe fixes with a preview of each change.
- Your code stays on your device.
What you can change
- HTML, CSS or JavaScript
- Show errors, warnings or tips
- Also tidy the layout when fixing
People find this page by searching
- html validator
- check html code for errors
- html checker online
- html error checker
- validate html
- find unclosed tags
- html lint online
Cite this tool
- APA
sdev.in. (n.d.). HTML validator [Web tool]. https://www.sdev.in/tools/html-validator
- MLA
"HTML validator." sdev.in, https://www.sdev.in/tools/html-validator.
- Chicago
sdev.in. "HTML validator." https://www.sdev.in/tools/html-validator.
- BibTeX
@misc{sdev-html-validator, title = {HTML validator}, author = {{sdev.in}}, howpublished = {\url{https://www.sdev.in/tools/html-validator}}, note = {Web tool} }
Questions people ask
What does an HTML validator check?
It reads your HTML the way a browser does and lists the mistakes: tags that are never closed or closed in the wrong order, elements in places they are not allowed, ids used twice, pictures without alt text, old tags like <center>, attribute values that do not exist and character names like   written without the semicolon.
My page looks fine. Why should I fix the errors?
Browsers guess when HTML is broken, and different browsers can guess differently. A missing end tag can push your footer inside a link, or hide a button from screen readers. Clean HTML looks the same everywhere and is easier for search engines to read.
What does Fix what can be fixed safely change?
Only things with one clear answer: it closes tags that were left open, removes stray end tags, adds alt="" to pictures, puts quotes around attribute values, adds missing semicolons to character names and adds the doctype and charset. You see every change before it is applied, and Undo puts your code back.
Does it check the CSS and JavaScript inside my page?
The HTML check skips what is inside <style> and <script>. Paste that code into the CSS validator or the JavaScript validator tab to check it too.
Is my code uploaded anywhere?
No. The checks run in a background worker inside your browser. Your code never leaves your device, so it is safe to check private work.