Convert vanilla CSS to Tailwind CSS utility classes instantly. Paste your CSS code and get the equivalent Tailwind classes. Supports margin, padding, colors, flex, grid, typography, and more -- all processed client-side in your browser.
Parses your CSS selectors and property-value pairs, then maps each property to its closest Tailwind CSS utility class. Handles shorthand properties and common values.
Recognizes @media queries with standard breakpoints and maps them to Tailwind responsive prefixes (sm:, md:, lg:, xl:). Converts mobile-first media queries automatically.
Properties without a direct Tailwind equivalent are displayed separately so you know what needs custom configuration or arbitrary values in your Tailwind setup.
All conversion happens in your browser. Your CSS code is never sent to any server, ensuring complete privacy and instant results with no network latency.
Tailwind CSS is a utility-first CSS framework that provides low-level utility classes for building custom designs. Instead of writing traditional CSS with selectors and property-value pairs, you apply pre-defined utility classes directly to HTML elements. Converting existing CSS to Tailwind classes can speed up migration and help developers learn the Tailwind approach.
Our converter parses CSS rules, extracts property-value pairs from each selector, and maps them to the closest Tailwind utility class. For example, padding: 1rem maps to p-4, display: flex maps to flex, and text-align: center maps to text-center. The converter handles the Tailwind spacing scale, color palette, and common property mappings.
The converter supports a wide range of CSS properties including spacing (margin, padding), sizing (width, height, max-width), typography (font-size, font-weight, line-height, text-align), colors (color, background-color), borders (border, border-radius), layout (display, position, flex, grid), and more. Each property is mapped to its standard Tailwind equivalent.
[property:value]), or keep them as plain CSS.
Check out our other free developer tools. Minify CSS, format HTML, generate flexbox layouts, and more -- all from your browser with no sign-up required.
CSS Minifier →