Tailwind CSS v3 to v4 Theme Converter

Migrate legacy JavaScript tailwind.config.js theme extensions into modern Tailwind CSS v4 CSS @theme variables.

Migrating to Tailwind CSS v4 CSS-First Architecture

Tailwind CSS v4 replaces the legacy JavaScript configuration file (tailwind.config.js) with a native, CSS-first architecture. In v4, design tokens and custom utility extensions are declared directly in your main stylesheet using standard CSS variables inside the @theme directive.

Key Syntax Changes

  • CSS Variables: Colors like theme.extend.colors.brand[500] become --color-brand-500: #22c55e; inside @theme.
  • Automatic Utilities: Declaring --color-brand-500 automatically creates bg-brand-500, text-brand-500, border-brand-500, and ring-brand-500 utility classes.
  • Zero Build Config: No plugins or custom postcss configuration files are required—simply import Tailwind via @import "tailwindcss";.