CSS Validator & Formatter

Validate CSS syntax, check for best practices and accessibility issues, and format your stylesheets with proper indentation.

Input CSS
Formatted CSS

Syntax

Use proper braces { } around declarations. End each property with a semicolon.

Best Practices

Prefer class selectors over IDs. Avoid !important. Group related styles.

Performance

Use shorthand properties. Minify for production. Consider critical CSS.

About the CSS Validator

This CSS validator checks property names and values, finds unclosed braces and missing semicolons, and flags vendor prefixes that current browsers no longer require. It catches the mistakes browsers hide by silently discarding whatever they cannot parse.

A CSS validator catches the mistakes that produce no error at all. Browsers discard any declaration they cannot parse and carry on, so a misspelled property or an invalid value simply does nothing — and a rule that silently does nothing is harder to debug than one that fails loudly.

Unclosed braces are worse, because they cascade. A missing closing brace makes the rest of the stylesheet part of the previous rule, so dozens of later rules stop applying and the visible symptom appears nowhere near the cause.

The vendor prefix check is mostly about deletion. Prefixes such as -webkit-border-radius and -moz-box-shadow were necessary years ago and are dead weight now, so flagging them is an invitation to remove code rather than add it.

How to use the CSS Validator

  1. Paste your CSS. Enter the stylesheet to check.
  2. Read the findings. Look at invalid properties, values and structural errors.
  3. Check the prefix notes. Remove vendor prefixes that are no longer needed.
  4. Fix and revalidate. Correct the stylesheet and check again.

CSS Validator features

  • Property name and value validation
  • Unclosed brace and missing semicolon detection
  • Vendor prefix redundancy warnings
  • At-rule and media query checks
  • Minification available alongside validation
  • Runs entirely in your browser

Frequently asked questions

Why is my CSS rule not applying?

Browsers discard declarations they cannot parse and carry on, so a misspelled property or invalid value silently does nothing.

What does an unclosed brace do?

It cascades. The rest of the stylesheet becomes part of the previous rule, so many later rules stop applying far from the actual mistake.

Do I still need vendor prefixes?

Rarely. Prefixes like -webkit-border-radius are long obsolete, so the check is mostly an invitation to delete code.

Does it check media queries?

Yes. At-rules and media queries are validated along with ordinary declarations.

Is my stylesheet uploaded?

No. Validation happens entirely in your browser.