CSS Validator: Check CSS Syntax, Properties, and Errors
The CSS Validator parses CSS with css-tree and reports syntax errors with their line and column positions, continuing past the first error so you can find more issues. It also flags property names absent from the CSS spec table as likely typos, while ignoring custom properties (--*) and vendor prefixes. Review rule, declaration, and @-rule counts alongside the results.
CSS Validator is a browser-based CSS syntax checker that parses stylesheets with css-tree. It reports syntax errors with line and column positions and continues past the first error so you can review additional issues. The tool also flags property names that are not in the CSS spec table as likely typos, and shows rule, declaration, and @-rule counts.
During validation, CSS is parsed and syntax problems are reported with their positions. Property names absent from the CSS spec table are flagged, but custom properties (--*) and vendor prefixes are ignored by that check. The validator can therefore help distinguish likely misspellings from those property-name patterns it is designed to skip.
CSS describes styling rules and declarations, while a validator checks whether the supplied stylesheet can be parsed and whether property names appear in the CSS spec table. Using a CSS Validator can help developers investigate errors before CSS reaches a parser that fails at runtime, verify generated output, and locate issues without searching through the file manually.
The CSS Validator runs entirely in your browser: your input is processed on your own device and is not sent to a server. It works offline once the page has loaded, so you can use it without a connection after that point. It is free to use, and developers and DevOps engineers can use it to check stylesheets and inspect validation results.
Step 1: Paste or drop your CSS into the tool. Include the stylesheet you want to check.
Step 2: Run the CSS check. The tool parses your input and reports syntax errors it finds.
Step 3: Review each reported error position. Use the line and column details to locate the relevant part of your CSS.
Step 4: Check the property warnings and counts. The tool flags unrecognized property names and shows rule, declaration, and @-rule totals.
Use case: Check a CSS file before it reaches a parser and fails at runtime. The validator can help you spot syntax issues earlier.
Use case: Find the line and column of a syntax error instead of bisecting the file by hand. Review the reported positions to narrow down where to investigate.
Use case: Confirm output from another tool is valid CSS, not merely plausible-looking text. The parser reports syntax errors it finds.
Use case: Look for likely property-name typos in a stylesheet. The validator flags names missing from the CSS spec table while ignoring custom properties and vendor prefixes.
Use case: Review rule, declaration, and @-rule counts after generating or editing CSS. The totals provide a quick overview of the stylesheet's contents.
Use case: Check a stylesheet that uses custom properties or vendor-prefixed properties. These are ignored by the property-name check, so they are not flagged as unknown properties.