CSS to Tailwind Converter

Runs in browser

Convert CSS to Tailwind utility classes instantly. Figma Inspect supported.

Convert plain CSS to Tailwind utility classes instantly. Also converts Figma CSS to Tailwind — paste from Figma Inspect and get utility classes with one click. Supports spacing, colors, flex, typography, and more.

CSS to Tailwind Converter tool

flex flex-col p-4 m-2 bg-slate-800 rounded-lg border border-slate-700 shadow-md text-sm font-medium text-slate-100 gap-3 max-w-sm w-full cursor-pointer transition-all duration-200

🔒 Runs in your browser · No uploads · Your data never leaves your device

How to use

  1. Paste CSS

    Use the default card example or paste your own rules inside a selector block.

  2. Review output

    Switch between Utility classes and @apply to copy either format. Toggle unmapped comments if something did not convert.

  3. Copy

    Copy utilities or the @apply block into your HTML, JSX, or stylesheet.

Common use cases

  • Converting Figma CSS to TailwindPaste CSS from Figma Inspect to get Tailwind utility classes for spacing, colors, flexbox, and typography.
  • Migrating a CSS codebase to TailwindConvert existing CSS rules to Tailwind utilities when refactoring a project to use utility-first CSS.

Examples

  • Flex card

    Padding, gap, and slate colors.

    Input
    .card { display: flex; padding: 16px; }
    Output
    flex p-4 …

Frequently asked questions

Does conversion run on a server?
No. Conversion runs entirely in your browser.
Is every CSS property supported?
Phase A covers common layout and color declarations. Unmapped lines can be shown as comments when the toggle is on.

Key concepts

Utility class
A single-purpose CSS class in Tailwind that applies one style rule — e.g. p-4 adds 1rem padding.
@apply
A Tailwind directive for using utility classes inside a CSS rule — useful when you can't add classes directly to HTML elements.

You might find these useful too.