CSS Validator
Check CSS for syntax errors, unknown properties, invalid values, bad selectors and missing semicolons, with line numbers. Your work stays on this device whenever possible.
How to use CSS Validator
- Paste your CSS, or open a .css file.
- Press "Validate CSS".
- Read the errors and warnings, with line and column numbers.
- Click a line number to jump to it, fix the code and check again.
Worked example
A button style is not applied. The validator shows "Value of margin runs into padding:. A semicolon is probably missing at the end of line 5." After adding the semicolon, both margin and padding work.
When to use this tool
- Finding the typo or missing semicolon that silently breaks a stylesheet.
- Checking CSS pasted from tutorials or AI answers before using it.
Important limitations
Properties and values are tested against the CSS engine of your browser, so very new features can show as unknown in an older browser.
Frequently asked questions
What does the CSS validator check?
Braces, comments and strings that are not closed; extra closing braces; unknown properties, with a "did you mean" suggestion; invalid values; missing semicolons; declarations outside a rule; invalid selectors, keyframe selectors and media queries; unknown at-rules; empty rules; and properties set twice in one rule.
How are properties and values checked?
Each one is tested with your browser's own CSS engine (CSS.supports), which is the same engine that will render your page. A value that fails there is ignored by that browser.
Does it support modern CSS like nesting, variables and @container?
Yes. Custom properties (--name) are accepted, var() values are accepted, nested rules and @container, @layer and @supports blocks are parsed, and @font-face and @property descriptors are not mistaken for properties.
Why is a repeated property only a warning?
Writing a property twice is often a deliberate fallback, such as width: 100px followed by width: min(100%, 600px). The later one wins in browsers that understand it.
Is my CSS uploaded?
No. It is checked in your browser.