CSS Validator
This CSS validator checks a stylesheet for the structural mistakes that actually break it: unbalanced braces, a declaration missing its colon, an unclosed comment or string, and blocks opening with no selector. Each is reported with its line number, which is what turns "the page looks wrong" into a fix. String contents are tracked properly, so a brace or a semicolon inside a content property is treated as data rather than as syntax — the case where a simpler checker produces false alarms. An unclosed comment gets its own mention because it silently swallows everything after it, which is one of the most confusing failures CSS produces.
How it works
Checks a stylesheet for the structural mistakes that actually break it: unbalanced braces, a missing colon in a declaration, an unclosed comment or string, and blocks with no selector. Each is reported with its line number.
String contents are tracked properly, so a brace or a semicolon inside content: "…" is treated as data rather than as syntax — which is where a simpler checker produces false alarms.
Everything runs in your browser — nothing you enter is sent to a server.
The errors that actually break a page
- A missing closing brace — every rule after it is absorbed into the unclosed block and stops applying.
- A missing colon — the declaration is discarded, and only that one, which makes it hard to spot.
- An unclosed comment — everything to the end of the file disappears.
- An unclosed string — the parser keeps reading until the next quote, wherever that is.
Why CSS fails so quietly
CSS is specified to be forgiving: a browser meeting something it does not understand skips it and carries on. That is what allows new properties to be used safely in old browsers, and it is also why a typo produces no error anywhere — just an element that is not styled the way you expected.
Syntax is not correctness
A stylesheet can be perfectly valid and completely wrong. This tool answers "will the browser parse this?", not "does this do what I intended?" — for the second question, the browser's own developer tools showing computed styles are what you want.
Frequently asked questions
What does it check?
Structural syntax: brace balance, missing colons in declarations, unclosed comments and strings, and blocks with no selector. Each issue is reported with its line.
Does it check property names and values?
No. It checks that the stylesheet is structurally well formed. A misspelled property is valid CSS syntactically — browsers ignore what they do not recognise, which is by design.
Why does a brace inside a string not count?
Because content: "}" is a perfectly valid declaration. String contents are tracked so their contents are treated as data — a checker that does not do this reports errors that are not there.
Why is an unclosed comment reported specially?
Because it swallows everything after it. A single missing */ can silently disable the rest of a stylesheet, and nothing in the rendered page points at the cause.
What are the warnings about at-rules?
An at-rule that is not part of CSS — @mixin, @include, @extend — usually means Sass or Less that was never compiled. The browser will ignore the whole block.
Is my stylesheet uploaded?
No. Validation runs entirely in your browser.
Related tools
CSS Formatter & Beautifier
This CSS formatter puts one declaration per line and normalises spacing without rewriting your values.
CSS Minifier
This CSS minifier strips comments and whitespace while protecting strings and url() values.
HTML Cleaner
This HTML cleaner strips the junk out of markup pasted from Word, Docs or a WYSIWYG editor.