CSS tool
CSS to Tailwind Converter
Drop in CSS declarations, older prefixed rules, or HTML with inline styles. Pick Tailwind v4, v3, or v2. Conversion stays on your device.
Converter
Target Tailwind v4. Paste declarations, a CSS rule, HTML with inline styles, or older prefixed CSS.
Tailwind utilities will appear here.How this CSS to Tailwind converter works
Tailwind prefers utility classes on markup instead of a separate stylesheet. That is fast to ship, but it is awkward when you already have CSS — a snippet from a design file, a legacy component, or an inline style attribute. This tool reads those declarations and emits the closest Tailwind class string you can paste into JSX, Vue, or plain HTML.
Conversion runs entirely in the browser. Paste something like display: flex; margin-top: 16px; color: #ffffff; and you should see utilities such as flex mt-4 text-white. Switch the version control if you need v3 or v2 class names.
Older CSS is welcome: vendor prefixes, IE star hacks, comments, and classic rule blocks are stripped down to declarations before conversion. Properties the selected Tailwind version cannot express stay listed under the output.
What converts well
Layout, spacing, typography, colors, borders, radius, and common flexbox or grid properties map cleanly. Hex, rgb, and named colors are matched against the default Tailwind palette when possible. v2 output remaps newer palettes such as slate to gray.
Use Sample for a modern snippet, or Legacy CSS for a prefixed IE-era block. Copy the class string when it looks right.
FAQ
Which Tailwind versions are supported?
v4 (default), v3, and v2. v4 prefers current utility names. v3 keeps JIT arbitrary values. v2 drops arbitrary values and maps palettes that did not exist yet.
Does old CSS still work?
Yes for declarations inside rules, inline styles, and common legacy noise such as comments, -webkit- prefixes, and *display hacks. Huge stylesheets should still be converted one component at a time.
Is my CSS uploaded anywhere?
No. Parsing and conversion happen in your browser tab. There is no account and no API call.