Tailwind to CSS Converter
Convert Tailwind utility classes into equivalent plain CSS. Covers spacing, sizing, the full color palette, typography, flex and grid, position, borders, shadows, opacity and more. Responsive prefixes become @media blocks and state variants like hover: and focus: become real pseudo-class rules, all wrapped in a selector you choose. Live output with copy and share.
About this ToolHow it works, benefits & use casesTap to collapse
Paste a string of Tailwind utility classes and see the equivalent plain CSS instantly. This converter maps a broad slice of the framework: spacing (margin, padding, gap) on the rem scale, sizing with keywords and fractions, the full default color palette resolved to real hex values, typography (font size, weight, line height, letter spacing, alignment, transform), flexbox and grid, position and inset, display, border width and style, border radius, box shadow, opacity, z-index, overflow, and transitions. Crucially it understands variants - a responsive prefix like md: wraps its declarations in a matching @media (min-width: 768px) block, and state prefixes such as hover:, focus:, active:, and disabled: become proper pseudo-class rules - while every base utility is grouped into one tidy rule. You choose the selector the rule is attached to (.element by default, or anything like .card or #hero), and any class the tool cannot map is listed under "Unrecognised classes" so nothing disappears silently. The output updates live, and you can copy, download, or share it.
How to Use
- 1Paste a space-separated list of Tailwind classes into the input, or click an example.
- 2Set the CSS selector the generated rule should attach to (defaults to .element).
- 3Read the live CSS output - base utilities are grouped into one rule, variants get their own @media or :pseudo rules.
- 4Check the "Unrecognised classes" badges for any utilities that could not be mapped.
- 5Copy, download as styles.css, share the link, or pipe the CSS into another tool.
Key Benefits
- Broad utility coverage: spacing, sizing, color, typography, flex, grid, borders, shadows, and more
- Resolves the full Tailwind color palette to real hex values, not variable placeholders
- Responsive prefixes become @media (min-width) blocks automatically
- State variants like hover: and focus: become real pseudo-class rules
- Configurable selector so the output drops straight into your stylesheet
- Flags unrecognized classes instead of silently dropping them
- Live output you can copy, download, share, or pipe onward
Common Use Cases
- Porting a Tailwind component to a project that uses plain CSS or CSS modules
- Understanding exactly what a dense className string compiles to
- Teaching the CSS behind common utility classes, including responsive and hover states
- Extracting a baseline rule to refactor into a custom component class
- Debugging spacing, layout, or breakpoint behavior by reading the underlying values
A complete CSS rule for your selector, with @media and :pseudo rules for variants
Type some Tailwind classes to see the CSS.
Paste a space-separated list of utility classes
Output selector
The generated rule(s) attach to this selector, e.g. .card or #hero.
Examples
Variants become real CSS
Responsive prefixes like md: wrap their declarations in a matching @media (min-width) block, while state prefixes such as hover: and focus: emit proper :pseudo-class rules. Base utilities are grouped into a single rule.
Nothing fails silently
Any class the converter does not recognise (arbitrary values, less common utilities) is listed under Unrecognised classes so you can handle it manually rather than wondering why it vanished.
Was this tool helpful?
Share Your Experience
Help others discover this tool!
Related guide
Related tools
A broad set: spacing (m/p/gap on the rem scale), sizing (w/h/min/max with keywords and fractions), the full default color palette for bg/text/border, typography (font size, weight, line height, tracking, alignment, transform, decoration), flexbox and grid, position and inset, display, border width/style/radius, box shadow, opacity, z-index, overflow, and transitions. Unknown or arbitrary-value classes are listed separately rather than dropped.
A responsive prefix wraps its declaration in the matching min-width media query: sm: becomes @media (min-width: 640px), md: becomes 768px, lg: 1024px, xl: 1280px, and 2xl: 1536px. So md:flex produces a media block containing display: flex on your selector, mirroring how Tailwind applies utilities from a breakpoint upward.

