// IT TOOLS & CALCULATORS
| 100+ TOOLS
🎨 CSS FORMATTER & VALIDATOR100% Free
// Validate, prettify and minify CSS — catch unbalanced braces and brackets instantly
ADVERTISEMENT
[ IN-CONTENT AD ]

CSS Formatter / Validator

Paste in minified or hand-mangled CSS and get back properly indented rules, with unbalanced braces, parentheses and stray closing braces flagged before they cost you twenty minutes of scrolling through a stylesheet looking for the one rule that swallowed everything after it.

Why one missing brace breaks everything after it

CSS has no equivalent of a syntax error that stops parsing outright — a browser's CSS parser recovers from most mistakes by skipping the malformed part and continuing, which is usually a feature. The exception is a missing closing }: every rule after the missing brace gets nested inside the block that never closed, silently becomes part of a selector or declaration it was never meant to belong to, and stops applying as written. It's one of the most common "why did my whole stylesheet stop working" causes, and it's exactly what the validator here is built to catch — nested @media and @supports blocks included, since those use the same brace structure.

What gets checked

  • Every { has a matching }, and vice versa — counted outside of comments and string values, so a brace character inside a quoted content: "{" value is never mistaken for real structure
  • Every ( has a matching ) — catches an unclosed url(, calc( or var( value

This deliberately doesn't try to validate individual property names or values — that would mean maintaining a list of every valid CSS property and every browser's vendor-prefixed and experimental properties, which changes constantly. Structural validity (the braces line up) catches the error class that actually breaks a stylesheet; a typo'd property name just gets ignored by the browser and normally shows up immediately when you look at the result.