Tailwind to CSS Converter
Turn Tailwind utility classes into the CSS they produce, with hover, focus, dark and breakpoint variants written as selectors and media queries.
How to convert Tailwind classes to CSS
Paste your Tailwind classes
Paste or type your Tailwind classes into the box, or press Try an example.
Name the selector
Pick the class or element the CSS is for.
Copy the CSS
Variants become :hover, :focus and @media rules.
Worked example
This is what Tailwind to CSS Converter gives for its own sample values. Open the tool above and change anything to try your own.
Tailwind classes (or a class="..." attribute)
class="flex items-center justify-between gap-4 rounded-xl bg-white px-6 py-4 shadow-md hover:shadow-lg md:px-8 text-slate-900 font-semibold"
- Selector
- .card
CSS
.card {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1rem;
border-radius: 0.75rem;
background-color: #fff;
padding-left: 1.5rem;
padding-right: 1.5rem;
padding-top: 1rem;
padding-bottom: 1rem;
box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
color: oklch(20.8% 0.042 265.755);
font-weight: 600;
...When to use Tailwind to CSS Converter
You inherited markup full of Tailwind classes and want to understand what styles they produce.
A component is moving to a project without Tailwind and needs its styles as plain CSS.
Tips for a better Tailwind to CSS Converter result
Paste the whole class attribute; the class= part and quotes are removed for you.
Name the selector after the component, so the CSS can be pasted straight into a stylesheet.
Tailwind to CSS Converter: limits and what to check
Plugins such as typography and forms add classes that are not converted, and they are listed as not converted.
Group and peer variants depend on parent elements, so the CSS shows the selector to use but you must add the matching class.
About Tailwind to CSS Converter
See exactly what a string of Tailwind classes does, or move a component out of Tailwind. Spacing, sizes, typography, colors with opacity, borders, radius, shadows, flex and grid, transitions and arbitrary values are converted, with values from Tailwind 4's default theme.
FAQs
Are custom theme values supported?
Only the default theme. Custom colors or spacing from your config show as not converted.
Why are colors in oklch?
Tailwind 4 defines its palette in oklch, and the CSS here uses the same values so colors match exactly.
How are breakpoints written?
md: becomes @media (width >= 48rem), as in Tailwind 4.