Tailwind CSS to Plain CSS Converter
Paste Tailwind utility classes and instantly get clean, standard CSS output
Paste your Tailwind utility classes and get the actual CSS properties back — hover states, responsive prefixes, arbitrary values like w-[200px], all of it mapped out in a clean stylesheet you can copy or download. Handy when you’re migrating away from Tailwind, building email templates, or just want to see what translate-x-1/2 really does. And everything runs in your browser. Nothing gets uploaded.
How It Works
The converter splits your input into individual class tokens, then matches each one against Tailwind’s utility map. Prefixes like hover:, md:, and dark: get stripped off first and used to wrap the output in the right selector or media query. Arbitrary bracket values like p-[10px] are extracted and dropped into the correct CSS property. The result is formatted, grouped CSS you can copy or download.
Examples
Basic Layout Card
A typical card component with padding, rounded corners, and a shadow.
flex flex-col p-6 bg-white rounded-xl shadow-lg gap-4
.element {
display: flex;
flex-direction: column;
padding: 1.5rem;
background-color: #ffffff;
border-radius: 0.75rem;
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
gap: 1rem;
}
Button with Hover and Focus States
When you need to pull out interactive styles for a non-Tailwind project.
px-4 py-2 bg-indigo-600 text-white font-semibold rounded-lg hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500
.element {
padding: 0.5rem 1rem;
background-color: #4f46e5;
color: #ffffff;
font-weight: 600;
border-radius: 0.5rem;
}
.element:hover {
background-color: #4338ca;
}
.element:focus {
outline: none;
ring: 2px solid #6366f1;
}
Responsive Grid with Dark Mode
A real-world layout that changes columns at breakpoints and swaps colors in dark mode. This is where manual conversion gets truly painful.
grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 bg-gray-50 dark:bg-gray-900 p-4 lg:p-8
.element {
display: grid;
grid-template-columns: 1fr;
gap: 1.5rem;
background-color: #f9fafb;
padding: 1rem;
}
@media (min-width: 768px) {
.element { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
.element { grid-template-columns: repeat(3, 1fr); padding: 2rem; }
}
@media (prefers-color-scheme: dark) {
.element { background-color: #111827; }
}
Who Uses This
Extracting styles from Tailwind components to drop into non-Tailwind projects or legacy codebases.
Converting Tailwind prototypes into inline CSS that email clients actually understand.
Learning what each Tailwind class does by seeing the real CSS properties it maps to.
Documenting component styles in plain CSS for design systems and style guides.
Common Mistakes
The converter expects space-separated class names, not <div class="..."> tags. Strip out the HTML and paste only what’s inside the quotes.
Custom classes from Tailwind plugins (like @tailwindcss/typography’s prose) aren’t part of the core utility map. Those won’t convert here — you’d need the full Tailwind CLI build for those.
Tailwind resolves class conflicts by source order in its generated stylesheet. If you paste p-4 p-8, this converter outputs both — but in a real Tailwind build, p-8 would win. Keep that in mind when you see duplicate properties.
Technical Details
- Processing: 100% client-side — nothing leaves your browser
- Browser Support: Chrome, Firefox, Safari, Edge
- Supported Prefixes: hover, focus, active, disabled, sm, md, lg, xl, 2xl, dark
- Arbitrary Values: Full bracket syntax (
bg-[#hex],w-[px],text-[rem]) - Output Format: Formatted CSS with proper indentation and grouped media queries
Frequently Asked Questions
Can I convert Tailwind CSS to regular CSS?
Yes — paste your Tailwind utility classes into the input box and the converter maps each one to its standard CSS equivalent. You get a clean stylesheet you can copy and use anywhere. It handles states like hover: and responsive prefixes like md: too.
What CSS does Tailwind generate for utility classes?
Each utility class maps to one or two CSS properties. For example, p-4 becomes padding: 1rem, and flex becomes display: flex. Tailwind’s spacing scale uses a 0.25rem base, so m-2 is margin: 0.5rem. This tool shows you exactly what each class produces.
Does this support Tailwind v3 and v4 classes?
The converter covers the core utility set that’s common across Tailwind v2, v3, and most of v4. Some newer v4-specific syntax might not be supported yet. For those edge cases, the official npx tailwindcss CLI is your best bet.
Is it safe to paste production code here?
Completely. The conversion runs in JavaScript right in your browser tab. Nothing gets sent to a server. You can paste proprietary class lists without any worry — check the Network tab in DevTools if you want proof.
Why are some Tailwind classes not converting?
Usually it’s a plugin class (like prose from Typography or animate-spin needing keyframes) or a custom class from your tailwind.config.js. This converter handles Tailwind’s built-in utilities and arbitrary values. Plugin-specific or config-extended classes need the full Tailwind build pipeline.