Validate CSS

Check CSS for malformed blocks, declarations, at-rules, and known property issues.

freeworks offlinenothing uploaded
ToolCSS Validator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Stylesheet text is tokenized and checked for balanced blocks, valid declarations, known property-value grammar, and malformed at-rules. Findings are reported without applying styles.

  • Syntax errors are separated from unknown-property warnings.
  • Vendor extensions can remain intentional.

Worked example

Catch missing colon in declaration
Detect a missing colon in a CSS property declaration
Input
											.btn {
  color: blue;
  font-size: 14px;
}
.card {
  padding 10px;
}
										
Output
												Found 1 error(s)

Stats: 2 rules, 2 selectors, 2 properties

Errors:
  - Invalid declaration: "padding 10px" (missing colon)
											

When to use this

CI, editors, and distributed design-system packages validate CSS.

Edge cases

  • Custom properties may contain unusual tokens.
  • A missing semicolon before a closing brace can still parse the final declaration.
  • Vendor prefixes are not automatically errors.

References