Tool Logo

CSS Validator

Find syntax errors, misspelled properties and invalid values in your CSS.

0 characters

Loading tool…

How to use the css validator

The validator uses CSSTree, which knows the grammar of every standard CSS property. It reports syntax errors, unknown properties such as a misspelled colr, and values that a property doesn't accept, such as width: 10pz or an empty color. Each problem is listed with its line and column so you can fix it quickly.

  1. Paste your CSS or upload a .css file.
  2. Read the list of problems, each with its line and column.
  3. Fix them and the list updates as you type.

When to use it

  • Typos

    Catch misspelled property names and units that browsers silently ignore.

  • Before deploying

    Check a stylesheet you edited by hand.

  • Learning CSS

    See exactly which values a property accepts.

Frequently asked questions

What does the validator check?

CSS syntax, whether each property name exists in the CSS specifications, and whether each value is allowed for its property. Each problem is listed with its line and column.

Why does a browser accept CSS that the validator rejects?

Browsers silently ignore declarations they don't understand, so a typo just doesn't apply. The validator reports it so you know the style isn't working.

Does it check browser support?

No. It checks your CSS against the specifications; whether a browser supports a feature is a separate question.

Does it support custom properties and modern CSS?

Yes. Custom properties (--name), var(), calc(), grid, and newer at-rules are part of the grammar it uses.

Is my CSS uploaded?

No. Everything runs in your browser; nothing you paste or upload is sent to our servers.