CSS Variables Extractor
Paste a stylesheet and get every CSS custom property (--name: value) as a table: name, resolved value, and the selector scope it was declared in (:root, .theme-dark, a media query, …). Duplicate declarations are grouped so you can see overrides at a glance, and optional output formats turn the tokens into a JSON object or JavaScript/TypeScript map for use in code.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
Every custom property, with the scope that declared it
Paste a stylesheet and the tool walks it block by block, recording each --name: value declaration together with the selector that declared it. The default Table output has three columns — Variable, Value and Scope — and the notes summarise how many declarations, unique variables and scopes were found.
Taking the tokens out of CSS you inherited
This is the tool for adopting a theme you did not write: feed in the compiled CSS and get a complete inventory of its design tokens, which selector holds the base value and which selector overrides it. It is just as useful for checking that a dark theme really redeclares everything the light theme defines.
The output format decides the shape
Table lists one row per declaration. JSON flattens each variable to its value, or to an array of value-and-scope objects where a name repeats. JavaScript wraps the same object in an export. SCSS turns each variable into a $variable, which collapses overrides to the last value. Group duplicate declarations controls whether repeats are grouped.
Limits and gotchas
CSS comments are stripped before parsing; Keep comments only adds a count annotation to SCSS lines for variables declared more than once. Input beyond 500,000 characters is refused, and a stylesheet with no custom properties is an error rather than an empty table. The SCSS export cannot express per-scope overrides, because SCSS variables are global.
Parsed in the browser
The stylesheet is read and parsed inside this tab and never uploaded, which matters when the CSS comes from a client's unpublished design system. Nothing about your tokens leaves the page.
Questions
What does "scope" mean?
The selector that declared the variable — :root for globals, .theme-dark for a theme override, or the enclosing @media/@supports block. Seeing the scope explains where an override takes effect.
How are duplicates handled?
The same variable declared in several scopes is grouped, listing every scope and value in order, so override chains are obvious. Turn grouping off to see one row per declaration.
Which formats can I export?
A table, a flat JSON object, a JavaScript object, or SCSS $variables. The JSON/JS forms are handy for feeding tokens into a design system.
Related tools
See categoryCSS Minifier
Minify CSS: strip comments, collapse whitespace, drop empty rules and extra semicolons.
CSS Specificity Calculator
Score a CSS selector's specificity (a,b,c) and see which rule wins between competing selectors.
CSS Unit Converter
Convert between px, rem, em, pt, pc, in, cm, mm and % for CSS lengths.
Color Palette Generator
Generate tints, shades, complementary, triadic and analogous color palettes.