CSS Validator
Check CSS for rules that fail to parse, live as you type.
Checks each rule using the browser's own CSS parser (inserted into a real stylesheet, then removed) — it can say a rule failed to parse and name its selector, but not give the exact error text a dedicated CSS linter would. At-rules like @media aren't checked individually. Runs entirely in your browser; nothing you type is sent anywhere.
Need the opposite? CSS Prettify
What is CSS Validator?
Paste CSS and this tool checks whether each rule parses using your browser's own CSS engine, flagging any that don't. It's a quick sanity check for a stray typo or malformed rule, not a full spec-compliance linter.
How to Use the CSS Validator
- 1
Paste the CSS: Enter the CSS you want checked for parsing problems.
- 2
Read the Results Instantly: Any rules that fail to parse are flagged automatically as you type.
- 3
Fix and Recheck: Adjust the flagged rule and watch the check update live.
How It Works
Each top-level rule is handed to the browser's own CSSOM parser (the same engine that parses a `<style>` tag) inside an isolated stylesheet. Browsers don't throw errors for CSS they can't parse. They just silently drop the malformed rule and move on, so this tool checks, after parsing, whether each rule you pasted actually made it into the resulting stylesheet. A rule that's missing afterward is flagged as failed to parse.
What It Catches
Structurally broken rules: an unclosed brace that swallows the rules after it, a selector with invalid syntax, or a rule broken badly enough that the browser can't recognize where it starts or ends. Example of invalid input: `.card size: large { color: red; }`. A selector like `.card size: large` isn't valid CSS selector syntax, so the browser drops the whole rule and this tool flags it as failed. What it won't catch: a rule that parses fine but uses an unknown property or an invalid value (e.g. `color: not-a-real-color;`). Browsers are lenient about unrecognized property/value pairs and simply ignore that one declaration rather than rejecting the whole rule, so this check has nothing to flag there.
Frequently Asked Questions
Common questions about CSS Validator.