Free · Fast · Privacy-first

CSS Property Validator

Check whether your browser recognises a specific CSS property name and accepts the value you assigned to it with FixTools, in a focused property-level validation pass that confirms in seconds whether a declaration will actually apply in the browser or whether it will be silently dropped.

CSS validator

Runs locally

Checks braces, strings and semicolons, then asks this browser whether each property and value is valid.

Results appear here: errors, warnings and suggestions, with line numbers.

Your CSS stays on this device and is never uploaded.

⚡

Checks property names with your browser’s CSS parser

🔒

Checks value syntax for each property

✨

Reports unknown properties and invalid value formats

⚡

Free, instant, and browser-based

Cost
Free tier
Sign-up
Not required
Processing
Tool-specific
Privacy
Clearly disclosed
IframeResponsiveAttribution included

Add this Validator Optimizer to your website

Drop the Validator Optimizer into a blog post, product docs, intranet, or school portal with one iframe. Processing, privacy, and usage limits are the same as on the full tool page.

  • One copy-ready line of HTML
  • Responsive — adapts to any container width
  • No API credentials are placed in the snippet

Embed code

<iframe
  src="https://www.fixtools.io/css-tool/validator-optimizer?embed=1"
  width="100%"
  height="780"
  frameborder="0"
  style="border:0;border-radius:16px;max-width:900px;"
  title="Validator Optimizer by FixTools"
  loading="lazy"
  allow="clipboard-write"
></iframe>

Attribution-friendly: a small "Powered by FixTools" link appears in the embed footer.

CSS Property Validation: Confirming That Your Browser Accepts Each Declaration

Every CSS declaration consists of a property name and a value, and both halves must be valid for the browser to apply the style at all. The property name must be a recognised CSS property, either a standard property from the current CSS specification, a custom property beginning with a double-hyphen, or a vendor-prefixed extension that the browser happens to support. The value must conform to the value syntax that is defined specifically for that property, which varies considerably across the language. Many properties accept multiple value formats, shorthand versus longhand, keyword versus length, function notation versus literal value, but each format has strict rules about ordering, units, and acceptable ranges. A single character out of place, a missing unit on a length, a misspelled keyword, a comma mixed with spaces inside a colour function, is enough to make the entire declaration invalid and cause the browser to silently drop it.

Validating CSS properties and values is most valuable when you are working with properties you do not use every day or with shorthand syntax that bundles multiple sub-values into a single declaration. The shorthand properties such as background, border, font, transition, animation, and grid accept many different value formats, and the rules for which formats are valid together are not always intuitive even for experienced developers. Running a shorthand declaration through the property validator confirms that the syntax is correct before you spend any time debugging why the rule is not having the visual effect you expected, which is the kind of small upfront investment that pays for itself many times over. For individual properties where the valid values are well known, property validation catches typos and out-of-range values quickly and inexpensively.

Property validation is also valuable when working with newer CSS features that you may not yet have full muscle memory for. Features such as container queries, cascade layers, the :has() selector and modern nesting were added to the specification at different times and may not yet have full support across every browser version your users run, but they should still conform to their specification syntax when you use them. Keep in mind that the FixTools validator asks the browser you are using, so a newer property your browser does not support yet is reported as unknown even when your syntax is right. Check support on MDN and re-run the check in each browser you target, because results can differ between browsers.

There is a deeper benefit to using property-level validation routinely, which is that it builds familiarity with the value syntax of each property over time. Every time the validator rejects a value as invalid, the error message names the rejected value and tells you to check its units, spelling and syntax, and looking the property up in the MDN reference reinforces what you have just learned. After a few months of this habit, you find yourself reaching for the validator less often because your internal model of CSS value syntax has been quietly improving in the background. The tool teaches you while it helps you, which is one of the best properties any developer tool can have.

How to use this tool

💡

Paste a rule block with the property you want to validate and click Validate. The report identifies any invalid property names or values.

How It Works

Step-by-step guide to css property validator:

  1. 1

    Identify the property to validate

    Find the specific CSS declaration, property name and value, that you want to check. This might be a single rule you are writing fresh, a declaration you copied from elsewhere and want to verify, or a property that is not producing the visual result you expected and you suspect may be invalid. Having the exact text in front of you makes the next steps faster.

  2. 2

    Paste a rule block containing the property

    Paste the declaration inside a simple rule block such as .test { your-property: your-value; } into the CSS Validator. Wrapping the declaration in a placeholder selector gives the validator a complete, parseable rule to evaluate, which produces clearer error output than pasting a bare declaration outside of any selector context.

  3. 3

    Validate

    Click Validate CSS. The tool parses the rule block and asks your browser’s CSS parser whether it knows the property name and accepts the value. Results are listed below the input with line numbers, with errors, warnings and suggestions clearly labelled.

  4. 4

    Review the result

    If the property is reported as unknown or the value as invalid, open the MDN CSS reference for that property and compare your declaration to the documented syntax. Adjust your value to conform to one of the valid formats, paste the corrected rule back into the validator, and confirm that the report is clean before moving on.

Real-world examples

Common situations where this approach makes a real difference:

A developer writes a complex CSS grid shorthand and validates it before testing the layout, confirming the syntax is correct before investing time in visual debugging.

The shorthand combined grid-template-columns, grid-template-rows, and an area definition into a single grid declaration, and the developer was not entirely confident in the ordering rules. Rather than load the page and try to interpret a confusing partial layout, they pasted the rule into the property validator and confirmed in seconds that the syntax was clean. The visual debugging session that followed was then focused on cascade and content questions rather than on whether the rule itself was even being applied.

A beginner cannot figure out why their font shorthand is being ignored, they validate it and discover the value order is wrong, with the font-family coming before the required size specification.

The beginner had written font: Arial 16px sans-serif, which superficially looks plausible but violates the required ordering rules of the font shorthand grammar. The validator reported that the browser rejects the value. After consulting the MDN reference, which explains the required order, the beginner rewrote the declaration as font: 16px Arial, sans-serif and the rule applied as intended. The lesson about shorthand ordering stuck because it was paired with a concrete fix on their own code.

A developer encounters an unfamiliar CSS property in a code review and validates it to confirm it is a real, standard CSS property before approving the pull request.

The pull request introduced a property the reviewer had never seen before, and they were unsure whether it was a real CSS feature, a vendor-specific extension, or an outright typo. Rather than approve and hope, they pasted the relevant rule block into the property validator and confirmed that the property was recognised by the browser. The reviewer then looked up the property in the MDN reference to understand its semantics before completing the review with appropriate context, which both improved the quality of the review and added a new property to their own working vocabulary.

A designer hand-writing CSS for a portfolio site uses the property validator to confirm every unfamiliar property they encounter in design-system documentation before adopting it into their own stylesheet.

The designer is comfortable with the most common properties but encounters less familiar ones such as scroll-snap-type, scroll-padding, and accent-color when exploring more polished design system patterns. For each unfamiliar property, they paste a small test rule into the validator to confirm both that the property name is recognised and that the value they have in mind is acceptable. This habit gives them the confidence to use modern CSS features in their own work without the unease of wondering whether each one is real, supported, or used correctly.

When to use this guide

Use this when you are unsure whether a specific CSS property name or value is valid, or when a single property is not applying as expected and you want to confirm it is syntactically correct.

Pro tips

Get better results with these expert suggestions:

1

Compare valid and invalid value formats to understand property syntax

When the validator reports an invalid value, intentionally try a few different value formats, different unit types, different keyword variants, different orderings, until the validator accepts the declaration. Watching the validator flip from invalid to valid in response to specific changes is an efficient way to learn the valid value syntax for properties you use infrequently.

2

Use property validation before raising a browser compatibility question

Before asking whether a CSS property is supported in a specific browser, run the validator in that browser. It asks that browser’s own parser, so an unknown property or rejected value there tells you the browser will drop the declaration. If it passes in one browser and fails in another, you have a support difference rather than a typo.

3

Validate CSS grid and flexbox shorthand values carefully

Grid and flexbox shorthand properties have particularly complex value syntax with multiple optional parts and strict ordering rules. Validate any non-trivial grid or flexbox shorthand you write to confirm your browser accepts it before debugging layout behaviour. Many apparent layout bugs in grid and flex contexts are actually shorthand syntax errors that the browser silently dropped.

4

Pay attention to unit requirements

Many CSS properties require specific units on their values, and the lack of a unit is one of the most common sources of silent failures. font-size: 16 is invalid because the number lacks a unit, font-size: 16px is valid, and the validator clearly distinguishes between them. Treat any length value without a unit as suspicious until you have confirmed the property in question allows unitless numbers.

5

Validate shorthand properties carefully

CSS shorthand properties like background, border, and font accept complex value syntax. If a shorthand is not applying, validate the entire declaration to confirm the value format is correct for the property.

6

Check the MDN reference after an "invalid value" error

When a property value is reported as invalid, look up the property in the MDN CSS reference to see the full list of valid value formats. The reference shows every accepted syntax variation for each property.

7

Validate new CSS properties before relying on them

Before building a feature around a newer CSS property, validate it in the browsers you target. The validator reports a property your browser does not support yet as unknown, which is also a useful support signal.

FAQ

Frequently asked questions

Wrap the declaration in a simple rule block, for example .test { margin: 10 }, and paste that into the validator input. The validator parses the rule and asks your browser’s CSS parser whether it knows the property name and accepts the value. A clean result confirms the browser you ran it in would accept the declaration, and any error message identifies precisely which part of the declaration is wrong. This is the simplest reliable way to verify a single property without ambiguity from surrounding context.
An unknown property means the browser you are using does not recognise the property name. The common causes are a typo in the property name, a vendor prefix for another browser engine (shown as not supported by this browser), or a newer property your browser does not support yet. Compare the reported name to the MDN CSS reference character by character to identify typos, and check whether any prefix you used is actually still needed in current browsers.
Yes, in the sense that custom properties (those beginning with two hyphens, such as --primary-colour) are validated as valid CSS declarations and their syntactic placement is checked normally. The validator confirms the surrounding syntax is correct but does not check the value type of a custom property, because custom properties are designed to hold any value, including ones that are only meaningful in the context of a specific other property via var() resolution. Treat custom properties as syntactically validated and semantically your responsibility.
Only for the browser you run it in. The validator asks that browser’s own CSS parser, so it reports what that browser accepts; it is not a specification check and has no browser compatibility table. A property that passes in one browser may be unknown in another, so use the MDN browser compatibility tables to check support across the browsers your users run.
Shorthand property values must conform to the specific grammar defined for that shorthand, which is often more constrained than the longhand equivalents because the grammar has to disambiguate multiple sub-values from a single string. Consult the MDN reference for the shorthand to see the accepted value formats, including ordering rules and required sub-values. A common mistake is providing values in the wrong order, mixing incompatible value types together, or omitting a required component that the shorthand expects.
Yes. A prefixed property that your browser supports passes. One it does not support, such as a -moz- property checked in Chrome, is shown as a warning saying it is not supported by this browser, with a reminder to keep the unprefixed version too. It is a warning, not an error, and the validator does not tell you which prefixes are still needed.
It depends entirely on the property, and there is no single answer that applies across the language. opacity accepts any number, but values outside zero to one are clamped. z-index accepts any integer, positive, negative, or zero. width accepts non-negative lengths and percentages. font-weight accepts numbers from one to one thousand in modern variable font usage. The valid range for each property is defined in the CSS specification and documented in the MDN CSS reference under the formal grammar section. Treat each property's range as a property-specific fact rather than something you can deduce by analogy.
Yes. Paste a complete rule block containing all the properties you want to validate, such as .test { color: red; margin: 10; padding: 1rem; }, and the validator will check every declaration in the block independently and report all invalid property names and values in a single pass. This is faster than validating one declaration at a time when you are checking a group of related properties, and the combined report is usually easier to scan than several separate single-property reports.
Modern CSS nesting, where a selector and its nested children appear inside a parent rule block, is now part of the specification and nested rules are accepted by the validator. Properties inside nested rules are checked the same way as properties in flat rules, and unclosed or stray braces are reported; nested selectors themselves are not checked. If you are adopting nesting in a project, validation is a good way to catch any unintended mixing of nesting syntax with older flat conventions during the transition.
Yes. Wrap the property in the appropriate at-rule context, for example @media (min-width: 600px) { .test { font-size: 18px; } }, and the validator will check the block structure and the nested property declaration; the media condition itself is not checked. Property validation works the same way regardless of whether the rule is at the top level of the stylesheet or nested inside a media query, container query, layer, or supports block.

Related guides

More use-case guides for the same tool:

Ready to get started?

Open Validator Optimizer to review its free limits and processing method.

Open Full CSS Validator

Free tier · No account needed · Transparent limits