Tailwind to CSS Converter
Paste your Tailwind CSS utility classes and get the equivalent plain CSS code instantly.
About This Tool
The Tailwind to CSS Converter is a free browser-based tool that translates Tailwind CSS utility classes into their equivalent plain CSS declarations. Whether you need to understand what a specific Tailwind class does under the hood, debug a layout issue, or migrate parts of a Tailwind project back to vanilla CSS, this tool provides instant, readable output with zero setup required.
Tailwind CSS is a utility-first framework where every class maps
to one or more CSS declarations. For example, flex items-center p-4
translates to display: flex; align-items: center; padding: 1rem;.
While this 1:1 mapping makes Tailwind powerful, it can be difficult
to remember the exact CSS equivalent for every utility — especially
for spacing scales, color values, and responsive breakpoints.
This converter supports a comprehensive range of Tailwind utilities
including layout (flex, grid, block, hidden),
spacing (p-*, m-*, gap-*), sizing (w-*, h-*,
max-w-*), typography (text-*, font-*, leading-*,
tracking-*), colors (bg-*, text-*, border-* with
the full Tailwind color palette), borders and border-radius
(rounded-*, border-*), effects (shadow-*, opacity-*),
transitions, transforms, and interactivity utilities like
cursor-* and select-*.
If you are working the other direction — converting CSS to Tailwind —
check out the CSS to Tailwind Converter.
For testing Tailwind classes visually in real time, try
the Tailwind Playground. And if you
need to customize your Tailwind theme, the
Tailwind Config Builder can help
you generate a tailwind.config.js file visually.
All processing happens entirely in your browser using native JavaScript. Your class names never leave your machine — there are no server round-trips, no logging, and no third-party analytics on your input. This makes it safe for proprietary codebases and internal projects.
Classes that cannot be mapped to a standard Tailwind utility are listed as unmapped in the output, so you always know which classes need manual attention or a custom configuration.
How to Use
- Paste or type your Tailwind CSS utility classes into the Tailwind Classes input panel. You can enter them on a single line separated by spaces, or on multiple lines.
- The tool automatically converts the classes to CSS in real time as you type. There is no convert button needed.
- Review the CSS Output on the right (or below on mobile). Each Tailwind class is translated to its CSS declaration inside a
.elementselector block. - Any classes that could not be mapped appear as a comment at the bottom labeled Unmapped classes. These may require custom Tailwind config or manual conversion.
- Click Copy (or press Ctrl+Shift+C) to copy the generated CSS to your clipboard.
- Click Clear to reset both panels and start fresh.
- Use the Sample button to load example Tailwind classes and see how various utilities are converted to CSS.
FAQ
Is my data safe?
Yes. All conversion happens entirely in your browser using JavaScript. No data is sent to any server, and nothing is logged or stored. You can safely paste proprietary class names from internal projects.
Which Tailwind utilities are supported?
The converter supports layout (flex, grid, block, inline, hidden), positioning (static, fixed, absolute, relative, sticky), flexbox and grid properties, spacing (padding, margin, gap), sizing (width, height, min/max), typography (font-size, font-weight, line-height, letter-spacing, text-align, text-transform), all default Tailwind colors for text, background, and borders, border-radius, box-shadow, opacity, transitions, transforms, z-index, overflow, cursor, user-select, visibility, and more.
What happens with unsupported or custom classes?
Classes that cannot be mapped to a standard Tailwind utility are listed in a comment at the bottom of the CSS output (e.g., /* Unmapped classes: my-custom-class */). This helps you identify which classes need manual conversion or are part of a custom Tailwind configuration.
Does it handle pseudo-class prefixes like hover: and focus:?
Yes. The converter recognizes common pseudo-class and responsive prefixes (hover:, focus:, active:, sm:, md:, lg:, xl:, 2xl:, dark:, etc.) and includes them as CSS comments alongside the converted declaration. Full pseudo-class selectors are not generated because the correct selector depends on your HTML structure.
Does it support the !important modifier?
Yes. If a Tailwind class starts with ! (e.g., !p-4), the generated CSS declaration will include !important (e.g., padding: 1rem !important;).
Can I convert multiple classes at once?
Absolutely. Paste as many classes as you like, separated by spaces or newlines. The tool will convert all of them into a single CSS block, making it easy to see the combined styles.
What keyboard shortcuts are available?
Ctrl+Shift+C (or Cmd+Shift+C on Mac) copies the CSS output to your clipboard.
Related Tools
Tailwind CSS Converter
Convert plain CSS to Tailwind CSS utility classes. Paste CSS rules and get equivalent Tailwind classes instantly.
Tailwind CSS Playground
Preview Tailwind CSS classes in real-time. Type class names and see the styles applied instantly with responsive breakpoint testing.
Tailwind Config Builder
Build tailwind.config.js visually with custom colors, spacing, fonts, and breakpoints.
CSS Layout Generator
Visually build Flexbox and CSS Grid layouts with live preview and generated CSS code.
CSS Variable Generator
Design color theme systems with CSS custom properties. Auto-generate shade scales, semantic tokens, and dark mode variants.