Validate CSS code for syntax errors and compliance with W3C standards.
The CSS Validator parses your stylesheet and flags the errors that make browsers silently drop rules: unclosed braces and comments, missing semicolons and colons, unknown properties, invalid values, malformed selectors and invalid media queries. Paste a full stylesheet or a snippet and get a line-by-line report. Structure is parsed by the tool and values are checked with your browser's own CSS engine, all locally in your browser.
Made for developers. Typical uses:
What minifying removes, how much it saves next to gzip and Brotli, and how to test minified CSS, JavaScript and HTML before you deploy it.
Syntax and format checks find broken markup, bad JSON and mistyped numbers, but not meaning, business rules, email deliverability or whether a URL is alive.
Explore more in Validators, read the guides and articles, or see how we test our tools.
Format and beautify messy CSS code with proper indentation.
Best for beautifying minified CSS for editing
Minify and compress CSS stylesheets to reduce file size.
Best for shrinking a stylesheet before deploying it to a production website to reduce load time
Validate HTML code for syntax errors and compliance.
Best for checking HTML for errors before deployment
Check color contrast ratios for WCAG compliance.
Best for checking that body text color meets WCAG AA contrast requirements before shipping a website
Format and beautify messy HTML code with proper indentation.
Best for beautifying minified HTML for editing