CSS validator with line-by-line detection
Paste a stylesheet and check whether each declaration is valid for the browser. The validator highlights the line, property and value causing the problem.
Workspace · CSS Validator
Se comprueba la sintaxis y si el navegador reconoce cada propiedad y valor con CSS.supports().
No se han detectado errores. Las propiedades experimentales pueden aparecer como no válidas si el navegador aún no las admite.
How to use it
Paste the full CSS or the snippet you want to check.
Read the list of problems, organised by line.
Correct any misspelt properties and values that the browser does not support; then validate again.
Examples
Incorrectly written property
‘colour: red’ is flagged as invalid because the correct property in CSS is ‘color’.
Key not turned
If a ‘}’ is missing, the validator indicates how many closing curly brackets are missing at the end of the file.
What you need to know
Validation combines a structural analysis of keys and declarations with CSS.supports(), the same API that the browser uses to determine whether it supports a property and a value. This is why the result depends on the browser you use to open the page: an experimental property may appear as invalid if that version of the browser does not yet support it.
The validator does not replace a style linter, nor does it check for accessibility, specificity or cross-browser compatibility. For that, you need tools such as Stylelint, Autoprefixer or the data from Can I Use.
Frequently Asked Questions
Related tools
Other tools that can help with similar tasks.
CSS Formatter
Format CSS code with well-indented rules, properties and curly brackets.
JavaScript Validator
Detect syntax errors in your code without running it, with line numbers and helpful warnings.
CSS Animation Generator
Choose an animation, adjust its duration and curve, and copy the keyframes using ‘reduced-motion’.
