Free · Fast · Privacy-first

CSS Property Validator

Check whether a specific CSS property name is valid and whether the value you assigned to it conforms to the CSS specification 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.

Validates property names against the CSS specification

🔒

Checks value syntax for each property

Reports unknown properties and invalid value formats

Free, instant, and browser-based

Cost
Free forever
Sign-up
Not required
Processing
In your browser
Privacy
Files stay local
FreeNo signupWhite-label

Add this Validator Optimizer to your website

Drop the Validator Optimizer into any page — blog post, product docs, intranet, school portal — with a single line of HTML. Your visitors get the full tool, processed entirely in their browser. No backend, no uploads, no signup.

  • Files stay 100% in the visitor's browser
  • Responsive — adapts to any container width
  • Free forever, no API key needed

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 Individual Declarations Conform to the Specification

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, an extra space 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. Properties and at-rules such as container, layer, has, 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. Validating new CSS properties confirms that your syntax is correct before you investigate browser support separately, because confirming that a rule is syntactically valid and confirming that it has the cross-browser coverage you need are two genuinely different questions that deserve to be addressed independently. Conflating them tends to lead to longer debugging sessions than treating them separately.

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 points you toward the formal grammar of the property in question, and looking that grammar 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. The tool parses the rule block, checks the property name against the recognised property list in the CSS specification, and checks the value against the formal grammar defined for that property. Results appear in the output area within a second or two, with both errors and warnings 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 identified the value as invalid and pointed at the ordering issue. After consulting the MDN reference for the correct 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 specification. 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, first confirm that your syntax is valid against the specification. An invalid property value will be dropped by all browsers consistently, which is a specification issue rather than a browser support issue. Resolving the syntactic question first saves you from chasing browser bugs that do not exist.

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 it conforms to the specification 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 that your syntax conforms to the specification. Syntax errors in new properties are harder to spot because the tooling ecosystem may not fully support them yet.

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, checks the property name against the recognised set, and checks the value against the formal grammar for that property. A clean result confirms the declaration would apply correctly in a browser, 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 validator does not recognise the property name as belonging to the standard CSS specification. The common causes are a typo in the property name, a vendor-prefixed property that the validator treats as non-standard because the prefix is not in the spec, or a genuinely experimental property that has not yet been formally specified. 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.
No, and this is an important distinction. The validator checks specification conformance, not browser support, and the two are different questions that are easy to conflate. A valid CSS property according to the specification may still not be supported in older browsers, while a property that is widely supported by browsers may have been deprecated or moved in the specification. Use the MDN browser compatibility tables to check support separately, and treat the validator result as a precondition rather than a guarantee of cross-browser behaviour.
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.
Vendor-prefixed properties such as those beginning with -webkit-, -moz-, or -ms- may be reported as unknown by the validator because they are not part of the standard CSS specification, only of the relevant browser's extended implementation. The validator checks against the specification, so non-standard extensions are flagged as unknown rather than as errors in the strict syntax sense. In modern development, most historical vendor prefixes are no longer required, so an unknown-property warning on a prefix is often a useful nudge to remove the prefix entirely.
It depends entirely on the property, and there is no single answer that applies across the language. opacity accepts numbers from zero to one inclusive. z-index accepts any integer, positive, negative, or zero. width accepts non-negative lengths and percentages. font-weight accepts integers 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 is recognised by the validator. Properties inside nested rules are checked the same way as properties in flat rules, and any syntactic issues with the nesting structure itself are reported separately. 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 both the at-rule structure and the nested property declaration. 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 the full Validator Optimizer — free, no account needed, works on any device.

Open Validator Optimizer →

Free · No account needed · Works on any device