Design token name checker
Paste your token names, CSS variables or a JSON token file. The checker tests every name against a naming convention you can adjust, explains each problem in plain words, and gives you a fixed list to rename from.
- Free, no sign-up
- Runs in your browser
- Saves as you go
How to use it
- Paste your tokens
One per line, a CSS :root block or a DTCG JSON file. A messy example is loaded to start.
- Set your convention
Separator, category words, state words and how many parts a name can have.
- Fix and export
Copy the fixed list, or the rename map for a find-and-replace or a codemod.
The convention it checks
Good token names read from general to specific: category first (colour, space, font), then the job (action, text, surface), then a variant (primary, muted), with any state (hover, disabled) last. One separator, lowercase, no abbreviations.
color-action-primary-hover = category · job · variant · state
| Problem | Example | Fixed |
|---|---|---|
| Capitals or mixed case | --colorTextMuted | color-text-muted |
| Abbreviation | --btn-bg-primary | color-button-background-primary |
| Category not first | --primary-text-color | color-primary-text |
| State not last | --color-surface-hover-brand | color-surface-brand-hover |
| Raw colour in a semantic name | --color-button-blue | Name it for its job, like color-action-primary |
The rules are adjustable: if your system uses dot.case or different category words, change them on the left and the whole report updates.
Questions
What is a good naming convention for design tokens?
Category, then the job, then a variant, with any state last, all lowercase with one separator: for example color-action-primary-hover.
Can I check a JSON token file?
Yes. Paste a DTCG or Tokens Studio style JSON file; the checker reads every token path.
Does it rename my tokens for me?
It gives you the fixed names and a JSON map from old to new, which you can use for a find-and-replace or a codemod.
Why flag raw colours in semantic tokens?
A semantic token like color-button-blue breaks the moment the button changes colour, for example in dark mode or a rebrand. Name it for its job instead.
Our two-week audit turns your real screens into a token plan, a first-components list and a rollout plan.