CSS validator
Paste CSS and see every mistake with its line and a plain fix.
PrivateNo uploadsRuns in your browserChecking…
Reading 20 lines
Problems
Errors break the page. Warnings may misbehave. Tips make it better. Tap one to see it in the code.
How to check CSS for errors
Paste or open your CSS
Paste a stylesheet or a few rules, open a .css 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 CSS.
Good to know
- A missing ; joins two lines into one value, so both are ignored. It is the most common CSS slip.
- Lengths other than 0 need a unit: width: 300px, not width: 300.
- CSS has no // comments. Use /* ... */ instead.
- A browser skips any line it does not understand without telling you. That is why a typo like colr: red is easy to miss.
- Modern CSS works here: custom properties, nesting with &, @layer and @container are all understood.
Where people use it
Style not working
Find the missing semicolon or brace that stops the rest of the styles.
Typos in properties
Spot a misspelled property and get a did you mean suggestion.
Clean up old code
Find vendor prefixes you no longer need.
Make it smaller
Minify the CSS once it is clean.
HTML, CSS and JavaScript minifierCheck the HTML too
Check the page markup for errors.
HTML validator
Why this one
It explains each problem in plain words and suggests the property you most likely meant.
- Line number and a plain fix for each problem.
- Catches bad colours, units and keyword values.
- One-click safe fixes, all 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
- css validator
- check css for errors
- css checker online
- css lint
- validate css
- css syntax checker
Cite this tool
- APA
sdev.in. (n.d.). CSS validator [Web tool]. https://www.sdev.in/tools/css-validator
- MLA
"CSS validator." sdev.in, https://www.sdev.in/tools/css-validator.
- Chicago
sdev.in. "CSS validator." https://www.sdev.in/tools/css-validator.
- BibTeX
@misc{sdev-css-validator, title = {CSS validator}, author = {{sdev.in}}, howpublished = {\url{https://www.sdev.in/tools/css-validator}}, note = {Web tool} }
Questions people ask
What does a CSS validator check?
It reads your stylesheet and lists the mistakes: missing semicolons, braces and brackets, property names that do not exist, colours like #12345 with the wrong number of digits, sizes without a unit, values a property does not take, misspelled pseudo-classes like :hovr, and old vendor prefixes.
Why does my CSS do nothing even though there is no error in the browser?
Browsers never show CSS errors. They quietly skip any line they do not understand, and a missing semicolon or brace can take the next lines with it. The validator shows exactly which line is skipped and why.
What does Fix what can be fixed safely change?
Only things with one clear answer: it adds missing semicolons and closing braces, fixes typos one letter away from a real property, colour, unit or keyword, removes the space in 16 px and turns // lines into proper comments. You see every change first, and Undo puts your code back.
Does it understand Sass, Less or Tailwind?
It checks plain CSS, the kind browsers read. Sass and Less code is pointed out so you know it must be built into CSS first. Build-tool lines such as @apply are accepted.
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.