U
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 is the difference between design tokens and CSS variables?+

Design tokens are the conceptual layer — the named, documented decisions about color, spacing, and typography that define your visual language. CSS custom properties (variables) are one implementation of design tokens in web code. The same token set can also be implemented as JavaScript constants, Sass variables, iOS Swift enums, or Android XML resources. This generator outputs tokens in JSON (the agnostic source of truth) and CSS variables (the web implementation). The JSON can be consumed by Style Dictionary to generate the platform-specific implementations from the same source.

How do I implement dark mode using the tokens this generator creates?+

The CSS variables output gives you a :root block with all your token values. Add a second block targeting your dark mode selector that overrides the color tokens with dark-appropriate values. If you use a class-based dark mode (like Tailwind's darkMode: 'class'), the override selector is .dark. If you use a data attribute, it's [data-theme='dark']. Override only the color tokens — your spacing, type scale, and radius tokens typically stay the same across themes. This is the exact pattern used by Tailwind's built-in dark mode utilities and shadcn/ui's theming system.

Can I use the JSON output with Figma Variables?+

Yes. Figma Variables (available in Professional and Enterprise plans) uses a similar token structure. You can import the JSON output using the Token Studio plugin (free tier available), which maps the JSON to Figma Variable collections and syncs changes back to your repository. Without a plugin, you can manually create Variable collections in Figma using the values from the JSON as your reference. The generated token names map directly to Figma collection and variable names.

What type scale ratio should I choose for my project?+

Use Minor Second (1.125) for compact, information-dense UIs like dashboards and admin tools where size differences should be subtle. Use Major Third (1.25) for general-purpose web applications — it's the most common choice because it creates clear hierarchy without extreme size jumps. Use Perfect Fourth (1.333) for content-heavy sites like blogs, documentation, and marketing pages where strong typographic hierarchy improves readability. Use Perfect Fifth (1.5) sparingly — it creates very dramatic size differences that work for editorial design but can feel overwhelming in product UIs.

How do I keep my design tokens in sync across a team?+

Store your token JSON file in your Git repository as the source of truth. Add a token generation step to your build process that converts the JSON to platform-specific outputs (CSS, Tailwind config) using Style Dictionary. When a designer updates tokens, they submit a pull request modifying the JSON file — the CI pipeline automatically regenerates all outputs and runs visual regression tests. For Figma sync, connect Token Studio to your repository with a GitHub integration so token changes in Figma automatically create pull requests. This creates a single audit trail for every visual decision your team makes.

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

21 Free Tools No Signup Required

Your Complete Design & Optimization Suite

Every tool runs entirely in your browser no uploads, no servers, no accounts. Fast, private, and free forever.

Design Tools

Colors, typography, CSS, SVG & more

Color Palette Generator

Popular

Generate beautiful color schemes using color theory algorithms monochromatic, complementary, triadic, and more.

  • 6 harmony types with HEX/RGB/HSL
  • One-click copy & unlimited palettes
  • WCAG accessibility contrast checking

Gradient Generator

Build stunning CSS gradients visually linear, radial, and conic and copy production-ready code instantly.

  • Linear, radial & conic gradients
  • Live CSS output with copy button
  • Unlimited color stops & angle control

Font Pairing

Discover expert Google Fonts combinations curated for optimal readability and aesthetic harmony.

  • 800+ professional pairings by mood
  • Live preview with custom text
  • Direct Google Fonts integration

CSS Generator

Generate production CSS visually flexbox, grid, typography, border, and box shadow with live preview.

  • Flexbox & Grid layout builder
  • Typography, border & shadow controls
  • CSS + Tailwind utility output

SVG Editor

Upload, edit, optimize, and convert SVG files entirely in your browser. Export clean SVG or React JSX.

  • Edit fill, stroke, dimensions, viewBox
  • Remove metadata & minify up to 70%
  • Convert SVG to JSX component

Favicon Generator

Generate favicons in all required sizes from any image PNG, ICO, and Apple Touch icons in one click.

  • All sizes: 16×16 to 512×512
  • ICO, PNG & Apple Touch export
  • No upload required 100% in browser

Design Token Generator

Build a complete design token system colors, spacing, typography, and shadows and export JSON or CSS variables.

  • Color, spacing & typography tokens
  • JSON & CSS custom property export
  • Tailwind config extension output

Optimization & Analysis

Images, accessibility, spacing & readability

Image Optimizer

Popular

Compress images up to 90% smaller WebP, AVIF, JPEG, PNG with filters, cropping, and rotation. 100% private.

  • WebP/AVIF/JPEG/PNG compression
  • Precision crop, rotate & filters
  • 100% client-side no uploads

Background Remover

AI

Remove image backgrounds instantly using on-device AI no uploads, no account. Download transparent PNG.

  • AI-powered accurate removal
  • Works on people, products & objects
  • Runs entirely in your browser

UI Shadow Generator

Generate a mathematically consistent shadow elevation system and export CSS variables or Tailwind config.

  • 3–10 elevation levels with live preview
  • 4 presets: Material, Soft, Sharp, Glow
  • CSS custom properties + Tailwind output

UI Spacing Scale

Build a harmonious spacing scale based on mathematical ratios and export it as CSS or Tailwind config.

  • Major second, golden ratio & more
  • Live ruler visualization per step
  • CSS & Tailwind spacing export

Border Radius Checker

Preview and compare border radius values in real time across multiple shapes and sizes.

  • Individual corner control
  • Live shape preview with real UI elements
  • CSS & Tailwind output

Color Contrast Checker

Check foreground/background color contrast ratios against WCAG AA and AAA accessibility standards.

  • WCAG AA & AAA compliance check
  • Live preview with real text samples
  • Suggested accessible color alternatives

UI Readability Analyzer

Analyze typography readability font size, line height, measure, and contrast with actionable improvement tips.

  • Flesch-Kincaid readability scoring
  • Font, spacing & contrast analysis
  • Actionable improvement suggestions

Links & Marketing

URLs, QR codes, tracking & security

URL Shortener

Links

Shorten any URL instantly with browser history, QR code export, and zero server tracking.

  • Instant URL shortening
  • Browser history & QR export
  • Zero server tracking

QR Code Generator

Custom QR codes for URLs, WiFi, vCards & more. Add colors, logo, download PNG or SVG.

  • URL, WiFi, vCard & more types
  • Custom colors & logo upload
  • PNG & SVG export

UTM Builder

Marketing

Build GA4-ready UTM tracking URLs with smart presets, validation, and CSV history export.

  • GA4-ready UTM parameters
  • Smart presets & validation
  • CSV history export

URL Cleaner

Privacy

Strip 50+ tracking parameters (UTM, fbclid, gclid, msclkid) with before/after comparison.

  • Removes 50+ tracking params
  • Before/after comparison view
  • One-click clean & copy

Link Preview Generator

SEO

See how your URL appears on Twitter, Facebook, LinkedIn & WhatsApp. Check OG metadata.

  • Social media preview simulation
  • OG metadata extraction
  • Card validator

Password Generator

Security

Cryptographically secure passwords, passphrases & PINs. All generated locally — never sent anywhere.

  • Crypto-secure generation
  • Passphrases & PINs supported
  • 100% local processing

Bio Link Builder

Creator

Build a link-in-bio page with live mobile preview, custom themes, and downloadable HTML.

  • Live mobile preview
  • Custom themes & styling
  • Downloadable HTML export

All tools are 100% free forever

No account, no subscription, no hidden limits. Every tool processes your data locally in the browser.

More tools added regularly