Tailwind → CSS

What Is the Tailwind to CSS Converter?

Paste a Tailwind CSS v3 class string and get the plain CSS it produces, written as one rule set for a selector you choose. Values come from tables generated from tailwindcss 3.4.17's own output, so colours, shadows, rings, transforms and spacing match what Tailwind compiles, without the --tw-* helper variables.

Why Use This Tool?

When migrating from Tailwind to plain CSS, or when you need to see what a long class string really does, this tool resolves the whole string at once: classes that combine (a ring plus a shadow, rotate plus scale, a gradient's from/via/to) become one value, responsive and state prefixes become @media and :hover rules, and space-y-* becomes the child rule Tailwind uses.

How to Use This Tailwind To CSS

  1. Paste your Tailwind classes — Enter the Tailwind CSS utility classes you want to convert (e.g., flex items-center gap-4 p-6 rounded-xl bg-white shadow-lg).
  2. View the vanilla CSS — The output updates as you type. Change the selector (for example .card) and anything the converter does not recognise is listed under the input instead of being dropped.
  3. Copy the CSS — Grab the complete CSS ruleset for use in projects that don't use Tailwind.

Checked against Tailwind's own compiler

On October 12, 2026 we compiled every class Tailwind CSS 3.4.17 generates with its default config (11,343 classes) and compared the converter's internal output with the compiler's for each one: all 11,343 match. We then loaded both into Chromium, Tailwind's compiled stylesheet on one element and the converter's plain CSS on another, and compared every computed property. Each class on its own: 11,341 of 11,344 elements identical; the three exceptions were container (identical once Tailwind's components layer is included, checked at four widths) and animate-ping/animate-pulse, whose copied CSS lacked the @keyframes rule. The converter now adds Tailwind's keyframes after any animate-* class. Including the children for space-*/divide-* and the ::before/::after boxes, 40 real-world class strings (buttons, cards, gradients, transforms, rings, variants) came out identical at 1300 px and 375 px, in light and dark mode, and with :hover and :focus forced. Some typical results:

ClassesCSS written
shadow-lgbox-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)
space-y-4.element > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; margin-bottom: 0 }
bg-blue-500/50background-color: rgb(59 130 246 / 0.5)
ring-2 ring-blue-500 ring-offset-2 shadow-mdbox-shadow: 0 0 0 2px #fff, 0 0 0 4px #3b82f6, 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)
-translate-x-1/2 rotate-45 scale-110transform: translateX(-50%) rotate(45deg) scale(1.1)
bg-gradient-to-r from-indigo-500 to-pink-500background-image: linear-gradient(to right, #6366f1, #ec4899)
md:flex hover:bg-blue-600.element:hover { background-color: #2563eb } and @media (min-width: 768px) { .element { display: flex } }

Common Use Cases

Exporting a Tailwind-built component to a non-Tailwind context: a CMS theme, a vanilla static page, an HTML email (where utility-class JIT compilation isn't available), a CodePen demo. Documenting the actual CSS a utility-heavy class string produces, so the next developer can reason about specificity, cascade, and browser support without expanding the classes in their head.

Debugging a styling issue where the rendered styles don't match expectations — seeing the resolved CSS rules side-by-side with the class string makes the conflicts visible. Migrating away from Tailwind on a project that's outgrown utility-first conventions and needs custom component CSS for maintainability. Each of those use cases benefits from a one-shot conversion rather than a class-by-class hover-and-copy.

Frequently Asked Questions

Why would I convert Tailwind to CSS?
Common reasons: migrating away from Tailwind, understanding a complex utility chain, writing documentation, creating CSS fallbacks, or explaining Tailwind code to team members unfamiliar with the framework.
Does it handle responsive prefixes?
Yes. sm:, md:, lg:, xl: and 2xl: become @media (min-width: 640/768/1024/1280/1536px) blocks, max-sm: to max-2xl: become the matching max-width queries, and dark: becomes @media (prefers-color-scheme: dark). State prefixes such as hover:, focus:, focus-visible:, active:, disabled:, first:, last:, odd: and even: become pseudo-class rules, before: and after: become ::before/::after rules (with content: ''), and group-hover: becomes .group:hover .element. Prefixes can be stacked, for example md:hover:bg-blue-600.
Does it support Tailwind v4?
No, it follows Tailwind v3: its tables come from tailwindcss 3.4.17's default config. v4 keeps most class names and spacing, but writes colours in OKLCH, changes some defaults (for example the default border colour and ring width) and adds utilities v3 does not have, so compile with the Tailwind v4 CLI when exact v4 output matters.
Does it handle arbitrary values like w-[200px]?
Yes. A value in square brackets becomes the CSS value with underscores turned into spaces, as in Tailwind: w-[200px] is width: 200px, grid-cols-[1fr_2fr] is grid-template-columns: 1fr 2fr, and mt-[calc(100%-2rem)] gets the spaces Tailwind adds (calc(100% - 2rem)). For prefixes that can mean several properties the value decides: text-[#0af] is a colour and text-[22px] a font size, bg-[url(...)] is an image and bg-[length:200px_100px] a size. Negative arbitrary values (-m-[4px]), opacity modifiers (bg-[#123456]/40) and arbitrary properties ([mask-type:luminance]) work too.
Can I convert entire component class strings?
Yes, that is what it is built for: paste the whole className string. Classes are applied in Tailwind's order and combined the way Tailwind combines them, so a ring and a shadow become one box-shadow and translate, rotate and scale one transform. In our test, 40 real component strings produced CSS that Chromium computes identically to Tailwind 3.4.17's compiled output. Anything it does not recognise, such as classes from your own config or plugins, is listed under the input.
What is Tailwind CSS?+
Tailwind CSS is a utility-first CSS framework that provides pre-built classes for styling HTML elements directly. Instead of writing custom CSS, you compose styles using utility classes like p-4 (padding: 1rem), text-lg (font-size: 1.125rem), and bg-blue-500 (background-color: #3B82F6). It's one of the most popular CSS frameworks.
Why would I convert Tailwind to vanilla CSS?+
Common reasons include: migrating a project away from Tailwind, understanding what Tailwind classes do under the hood, creating component libraries that don't depend on Tailwind, sharing styled components with teams that use different frameworks, or reducing build complexity.
Is Tailwind CSS better than vanilla CSS?+
Neither is universally better — they serve different needs. Tailwind accelerates development with pre-built utilities and enforces consistency. Vanilla CSS offers full control, zero dependencies, and smaller bundle sizes for simple projects. Many teams use Tailwind for applications and vanilla CSS for simple websites.

📖 Learn More

Related Article The Complete Guide to Tailwind CSS Colors → Related Article How to Convert Tailwind to CSS →

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service