Source checks, explained

CSS Validator

Find CSS syntax problems with precise source locations, check common values, and see which parts still need review. Your CSS stays in your browser and is never applied to this page.

Check your CSS

UTF-8, up to 600,000 bytes. Read locally.

Maximum 150,000 UTF-16 code units. CSS text only, without <style> tags. Validation normalizes CSS line endings in the editor; positions refer to that source.

Ready. Paste CSS or load a file, then validate.

Validation report

Your report will separate errors, advice, and grammar that has not been verified.

This is a bounded local checker, not a full W3C conformance or browser compatibility test.

How to use this CSS validator

  1. Paste a complete stylesheet or load a UTF-8 CSS file. Choose declarations only for a snippet such as padding: 1rem; opacity: .8.
  2. Select Validate CSS. Read errors first, then review the coverage statement and unverified items. A location button selects the relevant source in the editor.
  3. Correct the source and validate again. Copy a readable report or download JSON for a review. Download CSS saves the current normalized source, without applying fixes.

What the results mean

Error identifies a detected syntax or supported-value problem. Advice asks you to review valid patterns such as repeated properties or !important. Review means the checker has not verified that grammar. Unknown properties and at-rules can be legitimate new CSS. No errors found does not certify the entire stylesheet.

CSS implicitly closes component blocks and functions at the end of the source. Missing those explicit closing delimiters produces advice, while nested content remains grouped. The enclosed value can still have a grammar problem. Tokenizer errors, including unterminated strings, comments and unquoted URLs, and mismatched closing delimiters remain errors.

The lexer handles comments, escaped identifiers, strings, unquoted URLs and balanced brackets. Structural checks cover declarations, nested style rules, common group rules, keyframes and descriptor blocks. Local value checks cover ordinary margin and padding properties, opacity, a small set of keyword properties, and basic hexadecimal or common named colors. Functions such as calc(), var() and color-mix() require further grammar and computed-value checks.

Known keyword checks cover position, box-sizing, visibility, isolation, object-fit, overflow-x and overflow-y. Unrecognized keywords, units and functions are marked for review. The checker does not use browser support as a validity verdict.

Coverage and limits

Selector grammar, at-rule conditions and placement, descriptor values, custom-property substitution, complete property grammars, cascade behavior and cross-browser support are not fully validated. Unknown at-rule bodies receive lexical and bracket checks only. Keyframe percentages use basic from, to and percentage checks; timeline-range selectors remain unverified. Sass, Less and HTML are outside this tool's scope.

Each run accepts at most 150,000 UTF-16 code units, 50,000 tokens, 64 nested component blocks and 1,000,000 parser steps. Up to 150 findings, prioritizing errors then advice, and 300 declaration rows are retained; totals still include all detected findings and declarations in a completed run. Reaching a parsing limit marks the report incomplete. Line and column numbers are one-based; columns count UTF-16 code units, and a tab counts as one. CSS CRLF, CR and form-feed line endings become LF; a leading byte-order mark is removed and null or lone surrogate characters become the replacement character.

Privacy and standards

CSS source and reports remain in page memory. This tool does not upload source, save it in browser storage, load imported sheets, retrieve URLs or attach your CSS to a document. Downloaded reports include source excerpts and declaration values, so review them before sharing. Standard site analytics are controlled by the shared site shell.

Checks are informed by CSS Syntax, CSS Nesting, Custom Properties, CSS Box Model and CSS Color. For a separate standards-service review, visit the W3C CSS Validation Service. This link does not send your source.