CSS Validator
Paste CSS and instantly check it for syntax errors. Detects unclosed braces, invalid declarations, and unsupported property/value pairs — with line numbers for each issue.
Last updated: May 21, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is CSS Validator?
CSS errors are silent by default — browsers skip invalid rules without throwing an error, so bad CSS simply has no effect instead of breaking the page. This makes it easy for invalid declarations to sneak into production unnoticed.
This validator checks your CSS for structural errors (unclosed braces, mismatched brackets) and declaration issues (missing colons, empty values). It also uses the browser's CSS.supports() API to detect property/value combinations the browser does not recognise as valid — catching typos and unsupported shorthand values. Results are shown as errors (structural) or warnings (potentially invalid declarations) with line numbers.
How to Use CSS Validator
Paste CSS into the input area or click "Valid Sample" or "Invalid Sample"
The validator runs instantly
Errors (red) indicate structural problems like unclosed braces
Warnings (yellow) indicate suspicious declarations
Fix issues and re-validate until clean
Common Use Cases
- Front-end developers catching CSS syntax errors before committing to version control.
- Teams running CSS validation as part of a code review checklist.
- Developers debugging why a CSS rule has no visible effect on the page.
- Students learning CSS by checking whether their declarations are valid.
- Design systems teams enforcing CSS quality across component libraries.
- Web developers validating CSS extracted from third-party tools before use.
Example Input and Output
CSS with an unclosed brace and a missing semicolon is caught with exact line references.
.card {
background: white;
border-radius: 8px
padding: 16px;
.title {
font-size: 24px;
color: #333;
}✗ 1 error found
Line 6: Unclosed '{' — .card block was never closed
⚠ 1 warning
Line 4: Missing semicolon after border-radius declarationPrivacy
All validation runs in your browser. No data is uploaded to any server.
CSS.supports() browser dependency
Property/value warnings are based on what the current browser supports, not the CSS specification. A declaration flagged as a warning in one browser may be valid in another. Treat warnings as hints to double-check, not definitive errors.

