Validators & Checkers · Free CSS tool

CSS Validator & Syntax Checker

Free · no sign-up Live preview · copy or download the CSS

Paste a stylesheet and get a line-numbered report: unbalanced braces, declarations missing a colon or semicolon, properties CSS doesn't recognize, and empty rules. Everything runs locally in your browser.

Settings

Results appear here.
Generated CSS — updates live

The CSS you need to build this yourself

Understand the output, not just copy it — these lessons on our learning path teach exactly what this tool automates:

  1. CSS Minifier & FormatterDeveloper Tools
  2. CSS Property SorterCode Quality
  3. CSS Comment RemoverCode Quality
  4. CSS Diff CheckerCode Quality
  5. CSS Specificity CalculatorCalculators

How it works

The checker walks your stylesheet line by line: it tracks brace depth for balance, splits declarations on semicolons to verify each has a colon, flags rules that close without any declarations, and compares every property name against a built-in list of standard CSS properties (vendor prefixes and --custom-properties pass automatically).

It's a fast sanity check, not a full spec parser — value grammar (is display: 12px valid?) is beyond a lightweight in-browser tool. For a typo'd property or a lost brace at 2am, it's exactly what you need.

Run the code — try it yourself

This page has two bugs: a missing colon and an unknown property. Find them by eye — then confirm with the validator above.

exercise.html — editable

Frequently asked questions

Is my CSS sent to a server?

No — validation is pure JavaScript in your tab.

It flagged a brand-new property as unknown.

The built-in list covers the widely-supported set; very new properties may warn. A warning is a prompt to double-check, not a verdict.

Does it validate values too?

No — property names, structure and punctuation only. Value grammar needs a full parser like the W3C validator.

Keep going

A validator catches the mechanical mistakes so code review can focus on design decisions. Pair it with the CSS Minifier on the way to production, and the Property Sorter for tidy diffs.

CSSmatic is a non-profit project, made by developers for developers.