CSS Validator

Check CSS for unclosed braces, brackets, strings and comments.

This tool runs entirely in your browser. Your files are never uploaded to a server.

Valid: No bracket, string or comment syntax errors found.

  • Rule or at-rule blocks opened: 3

Clear the entered value before starting another check. Validation runs locally and does not check against any external registry, server, or account.

What this tool does

Checks CSS text for broken syntax: unbalanced { }, ( ) and [ ] brackets, an unterminated quoted string, and an unclosed /* */ comment.

How to use it

Paste a stylesheet or a snippet. The checker scans character by character, skipping over comments and string contents, and tracks every bracket on a stack to confirm each one closes in the right order.

Example

Entering @media (min-width: 600px) { .card { padding: 2rem; } } returns valid with 2 rule blocks opened; removing the final } returns invalid, reporting one unclosed {.

Validation

Every {, ( and [ must have a matching closing character in the correct order; every quoted string must close with the same quote mark before the line ends; every /* comment must have a matching */.

How to interpret the result

A valid result means the file tokenizes cleanly — it does not check that property names exist, that values are legal for their property, or that selectors match any element; a file can pass this check and still contain a typo like colr: red or an invalid property value.

Limitations

This checker does not validate CSS the way the W3C CSS Validator does — it has no database of property names or value grammars, so semantic errors are entirely out of scope. It also targets plain CSS syntax, not Sass/SCSS/LESS-specific syntax such as // line comments or nesting operators, which this checker does not recognize as valid.

Privacy

All processing uses local browser APIs and this tool does not upload the values you enter.

Frequently Asked Questions

What does CSS Validator do?
Checks CSS text for broken syntax: unbalanced { }, ( ) and [ ] brackets, an unterminated quoted string, and an unclosed /* */ comment.
How does it handle invalid input?
Every {, ( and [ must have a matching closing character in the correct order; every quoted string must close with the same quote mark before the line ends; every /* comment must have a matching */.
Is entered data uploaded?
All processing uses local browser APIs and this tool does not upload the values you enter.