Developer Tools
CSS Validator & Autoprefixer
Validate CSS against the specifications — syntax errors, unknown properties, invalid values, duplicates, unclosed blocks — and add vendor prefixes for your target browsers with Autoprefixer.
How to use
- 1Paste your CSS.
- 2Fix the listed errors and warnings (each has a line number).
- 3Choose target browsers and add vendor prefixes.
Frequently asked questions
Does it support modern CSS?
Yes — grid, custom properties, container queries, :has() and other current features are recognized.
Why isn't a value with var() checked?
The value of a custom property is only known when the page renders, so values containing var() are skipped.
Do I still need vendor prefixes?
Only for a few properties (e.g. user-select, some mask and backdrop features). Autoprefixer adds just the ones your chosen browsers need.
A real parser, not a list of regex typo-checks
The validator builds an actual AST with css-tree — the same kind of parser used inside production build tools — then checks every declaration's value against the W3C/MDN grammar for that property via its lexer. That catches structural problems a regex-based checker would miss entirely, like a value that's syntactically fine but invalid for that specific property.
Worked example: three real mistakes in the sample CSS
Running the tool's own preloaded sample — which includes colr: #333; (a typo), margin: 10px 5px 3px 2px 1px; (five values) and a repeated color: red; / color: blue; in the same :hover rule — reports exactly: an error that "colr" is an unknown property (line 3); an error that "10px 5px 3px 2px 1px" isn't a valid value for "margin", since the margin shorthand only accepts 1–4 values (line 4); and a warning that "color" is declared twice in the rule, with the line-12 value overridden by line 13. The summary line also reports 3 rules and 11 declarations parsed in total — verified directly against the checker's own output.
What it deliberately skips
Any value containing var(--something) is left unchecked, because a custom property's actual value is only known at render time — there's no way to statically verify it resolves to something valid for that property. Values css-tree can't fully parse into a structured form are skipped the same way, so a wrong value nested inside an unusual at-rule might slip through uncaught rather than producing a false positive.
Vendor prefixes are a separate, opt-in pass
Prefixing only runs when you click "Add vendor prefixes," using Autoprefixer against real Can I Use data for whichever browser target you pick — from the loose "Default" query up to a legacy preset that still supports Internet Explorer 11. Most CSS written today doesn't need prefixes at all (grid, flexbox and custom properties are unprefixed everywhere current), so in practice this mainly adds -webkit- for things like user-select, backdrop-filter and a handful of mask properties that Safari still wants prefixed.
Two warnings that aren't syntax problems at all
An empty rule — a selector whose block has no declarations inside it at all, like .leftover-class {} after a refactor — is flagged as a warning rather than an error, since it's valid CSS that parses fine but almost always means dead code left behind by an edit. Any declaration using !important is flagged too, not because it's invalid, but because reaching for it is usually a symptom of a specificity fight elsewhere in the stylesheet; the warning is a nudge to fix the underlying selector conflict rather than a rule that !important itself is wrong.
Errors stop at the first unmatched brace
Beyond per-declaration checks, the parser tracks every { and } it opens, so a block that's opened but never closed is reported with the exact line and column where the unmatched { appeared — and a stray closing } with nothing left open gets its own distinct "there's no block to close" error. This matters because a single missing closing brace early in a long stylesheet can otherwise cascade into dozens of confusing downstream errors in other tools; reporting the actual unmatched brace location, rather than everything that looks broken afterward, is what makes the error list usable instead of overwhelming.
Related tools
- Code Beautifier (HTML, CSS, JavaScript)
Beautify messy or minified HTML, CSS and JavaScript into clean, consistently indented code you can read and edit.
- CSS & HTML Minifier
Minify CSS or HTML to shrink file size — strips comments and whitespace and shows how many bytes you saved.
- JSON Formatter & Validator
Format, beautify, validate and minify JSON — with clear line and column error messages and optional key sorting.
- HTML Checker (Tags, Accessibility, SEO Basics)
Check HTML for unclosed or mismatched tags, duplicate IDs, images without alt text, missing lang/title/viewport and other common mistakes.
- CSS to Tailwind Converter
Convert plain CSS declarations or rules into Tailwind CSS utility classes — spacing, flexbox, grid, typography, colors, borders and more, with arbitrary values where needed.
- CSS Box Shadow, Border Radius & Glassmorphism Generator
Design CSS box shadows, rounded corners and frosted-glass (glassmorphism) effects with sliders and a live preview — then copy the CSS.