CSS Validator

Find the syntax mistakes that make browsers silently drop CSS rules, each with a line and column.

CSS
Result
Runs locally in your browser

About the CSS Validator

Browsers do not throw errors for bad CSS; they skip the broken rule and everything up to the next recovery point, which is why a single missing brace can turn off half a stylesheet. This validator reports the problems a browser would swallow: a brace that is never closed, an unexpected closing brace, an unterminated string or comment, a declaration with no colon, and a property with no value.

Each problem is reported with its line and column, and the first one is highlighted in the editor. When the stylesheet is clean, the result summarises the number of blocks, declarations, media queries and !important flags, which is a useful sanity check after a large edit.

This checks syntax, not the property list. It does not know whether colour is a typo for color or whether a value is valid for its property; that is the job of a linter such as stylelint with a full property database. Everyday breakage is structural, and that is what this catches. Format the clean result with the CSS Formatter.

How to use

  1. Paste the stylesheet.
  2. Read the problem list with line numbers, or the summary if it is clean.
  3. Fix each spot in the left pane; the result updates as you type.

Common questions

Does it check property names and values?
No, only syntax. Use a linter with a property database for that.
Are SCSS and LESS supported?
Nesting passes, but variables, mixins and functions will be reported as declarations without a colon. Compile them to CSS first.
Why is a trailing semicolon after the last declaration fine?
CSS allows it. The validator only flags declarations that are missing a colon or a value.