Uitly Logo
UITLY
Design Token Generator

Free Design Token Generator JSON, CSS & Tailwind

Turn your brand colors, typography settings, and spacing base into a complete design token set. Export JSON tokens, CSS custom properties, and a Tailwind config extension in one click the foundation every scalable design system needs.

Full Token Set

Colors with light/dark/contrast variants, type scale, spacing, and border radii — all from your inputs

3 Export Formats

JSON for Style Dictionary, CSS variables for any framework, and a Tailwind config extension ready to paste

Live Preview

See your tokens applied to a real UI card — buttons, type, color swatches, and spacing — in light and dark mode

Build Your Design Token System

Add your brand colors, configure typography settings, set your spacing base — then export a complete, production-ready token set in JSON, CSS, or Tailwind format.

Design Token Generator

Brand Colors

Typography

Spacing Base Unit

8px

Live Theme Preview

Aa

Brand System

Design Token Preview

v1.0

The quick fox

Base body text at 16px. Consistent type scales improve readability across every screen.

primary
secondary
accent
8px
16px
24px
32px
48px
64px

12

Colors

7

Type sizes

9

Spacing

4

Radii

Design Tokens JSON

{
  "color": {
    "primary": {
      "DEFAULT": "#2563eb",
      "light": "#4d8bff",
      "dark": "#114fd7",
      "contrast": "#ffffff"
    },
    "secondary": {
      "DEFAULT": "#7c3aed",
      "light": "#a462ff",
      "dark": "#6826d9",
      "contrast": "#ffffff"
    },
    "accent": {
      "DEFAULT": "#059669",
      "light": "#2dbe91",
      "dark": "#008255",
      "contrast": "#ffffff"
    }
  },
  "typography": {
    "fontFamily": {
      "base": "Inter",
      "mono": "JetBrains Mono"
    },
    "fontSize": {
      "xs": "12px",
      "sm": "14px",
      "base": "16px",
      "lg": "20px",
      "xl": "25px",
      "2xl": "31px",
      "3xl": "39px"
    },
    "lineHeight": {
      "tight": "1.25",
      "normal": "1.5",
      "relaxed": "1.75"
    }
  },
  "spacing": {
    "space-1": "8px",
    "space-2": "16px",
    "space-3": "24px",
    "space-4": "32px",
    "space-6": "48px",
    "space-8": "64px",
    "space-12": "96px",
    "space-16": "128px",
    "space-24": "192px"
  },
  "radius": {
    "sm": "8px",
    "md": "16px",
    "lg": "24px",
    "full": "9999px"
  }
}

What the Generator Produces

JSON Design Tokens

  • W3C Design Tokens Community Group compatible structure
  • Works with Style Dictionary, Token Studio, Supernova
  • Platform-agnostic source of truth

CSS Custom Properties

  • Full :root block with all token categories
  • Color variants: DEFAULT, light, dark, contrast
  • Works in React, Vue, Angular, Astro, vanilla

Tailwind Config

  • theme.extend block with colors, fonts, sizes
  • Merges with Tailwind defaults, doesn't override
  • Compatible with Tailwind v3 and v4

No account required — 100% free

The Complete Guide to Design Tokens

When a startup scales from three engineers to thirty, design decisions start fracturing. The blue in the hero is #2563eb. The blue in the nav is #1d4ed8. The blue in the button is some hex value that one engineer typed from memory six months ago. Three different blues, no documentation, no system. This is the problem design tokens solve — and this generator gives you the infrastructure to prevent it before it starts.

What Are Design Tokens?

Design tokens are named variables that store the visual decisions of a design system — colors, typography, spacing, shadows, border radii, motion durations. Instead of hardcoding #2563eb throughout your codebase, you define --color-primary: #2563eb once and reference the token everywhere.

The term was popularized by Salesforce's Lightning Design System team in 2014, but the concept now underpins every major design system — Material Design, Carbon (IBM), Fluent (Microsoft), Spectrum (Adobe), and Base Web (Uber). The W3C Design Tokens Community Group is actively standardizing a JSON format for cross-tool compatibility.

Without Design Tokens

  • Colors hardcoded throughout 200+ files
  • Rebrand requires global find-and-replace
  • Engineers make up spacing values on the spot
  • Dark mode requires duplicating all styles
  • Figma and code drift apart within weeks

With Design Tokens

  • Every color references a named token
  • Rebrand = change values in one file
  • Spacing comes from a documented scale
  • Dark mode = override token values
  • Figma Variables sync to code tokens

Why Design Tokens Matter for Scaling Teams

Design tokens matter most at the transitions: when a one-person design team becomes a three-person team, when a two-platform codebase becomes five, when a startup brand needs to support white-labeling. Tokens are the contract between design and engineering that holds across those transitions.

Tokens also enable what's become the most requested feature in every design system: dark mode. Without tokens, dark mode requires duplicating every stylesheet and maintaining two parallel systems. With tokens, dark mode is simply a different set of values for the same token names you override --color-primary in a [data-theme="dark"] selector, and every component updates automatically.

How This Design Token Generator Works

The generator takes three categories of input and derives a complete, structured token set from them:

  • 1Brand colors: Each color you add generates four tokens: the base value, a lightened variant (for backgrounds and tints), a darkened variant (for hover states), and a contrast-safe text color (black or white, determined by WCAG relative luminance). You can name each token with any semantic name primary, brand, danger, accent.
  • 2Typography settings: Your base font size, type scale ratio, and line height generate a seven-step type scale (xs through 3xl) using the same mathematical progression as professional type systems. The four ratio presets Minor Second, Major Third, Perfect Fourth, Perfect Fifth match the ratios used by most major design systems and type foundries.
  • 3Spacing base: The spacing base unit generates a nine-step scale using the same linear multiplier sequence as Tailwind's default spacing. It also derives four border radius values (sm, md, lg, full) that are proportional to your spacing base, ensuring your radii and spacing feel visually related.

All generation happens in the browser using React's useMemo no server requests, no rate limits. The three output tabs produce the same token data structured for three different consumption contexts: JSON for design tooling, CSS for browsers, and JavaScript for Tailwind.

Integration Guide: Using Your Tokens in Production

Option 1: CSS Variables (Any Stack)

Paste the CSS variables output into your globals.css or equivalent base stylesheet. Reference them anywhere in your CSS:

.button-primary {
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

Option 2: Tailwind Config (Next.js / React)

Merge the Tailwind output into your tailwind.config.js. Your token names become utility class names automatically:

{/* Use your token names as Tailwind classes */}
<button className="bg-primary text-primary-contrast px-space-3 py-space-2
                   text-sm rounded-md hover:bg-primary-dark transition-colors">
  Get Started
</button>

Option 3: Style Dictionary (Multi-Platform)

Use the JSON output as the input for Style Dictionary to transform tokens into iOS Swift, Android XML, React Native, and CSS simultaneously from one source file.

// style-dictionary.config.json
{
  "source": ["tokens/tokens.json"],
  "platforms": {
    "css": { "transformGroup": "css" },
    "ios": { "transformGroup": "ios-swift" },
    "android": { "transformGroup": "android" }
  }
}

Real-World Usage: Lessons from Production Design Systems

Start with semantic names, not descriptive ones

Name tokens by their role, not their value. --color-primary is a semantic token. --color-blue-600 is a descriptive token. Semantic tokens survive rebrands and theme changes descriptive ones become lies the moment you change the value. When your primary color changes from blue to teal, --color-primary still makes sense, but --color-blue-600 doesn't.

Build three token tiers for mature systems

Enterprise design systems typically use three layers: Global tokens (all raw values: --blue-600: #2563eb), Alias tokens (semantic mappings: --color-interactive: var(--blue-600)), and Component tokens (scoped values: --button-bg: var(--color-interactive)). This generator produces global and alias tokens add component tokens as your system matures.

Document the contract, not just the values

The most useful token system documentation explains when to use each token, not just what it equals. '--color-primary: used for primary CTAs, active states, and links. Never use for error states or destructive actions.' This context prevents misuse more effectively than any linting rule.

Automate sync between Figma and code

The biggest maintenance cost in any token system is keeping Figma Variables and code tokens in sync. Tools like Token Studio (formerly Figma Tokens), Supernova, and Specify automate this sync in both directions. The JSON this generator produces is compatible with all three paste it as your starting point and connect your Git repository to enable automatic PR generation when tokens change in Figma.

Frequently Asked Questions

What are design tokens?+

Design tokens are named variables that store visual design decisions — colors, spacing values, font sizes, shadow values, and border radii. Instead of hardcoding #3B82F6 everywhere, you use a token named --color-primary. This makes it easy to update your design system globally without hunting through code.

What formats can I export design tokens in?+

Uitly's design token generator exports tokens in three formats: JSON (compatible with Style Dictionary and most design tooling), CSS custom properties (e.g., --spacing-4: 1rem), and Tailwind CSS config (a theme extension object you paste directly into tailwind.config.js).

How do design tokens work with Tailwind CSS?+

Paste Uitly's Tailwind output into the theme.extend section of your tailwind.config.js file. This adds your custom tokens as Tailwind utilities — for example, a spacing token named --spacing-4 becomes the class p-4 with your custom value.

What is the difference between design tokens and CSS variables?+

CSS custom properties (variables) are a browser-native implementation of the design token concept. Design tokens are the broader concept — they can be exported to any format (CSS, JSON, Sass, JavaScript). CSS variables are one output format for design tokens.

Every week you spend without a token system, your codebase accumulates more hardcoded values and your design-code gap grows wider. The best time to build a token foundation is at the start of a project. The second-best time is now. Generate your token set above, paste the CSS variables into your stylesheet, and give your team a shared language for every visual decision going forward.

Free forever · No account · JSON, CSS & Tailwind output

You might also like

4 related tools