What converts cleanly — and what needs your hand
The converter maps standard property/value declarations to utilities and back. It handles layout, spacing, sizing, typography, color, borders, and shadows well. What it can’t fully translate are the things Tailwind expresses as variants and config rather than raw declarations:
| Converts directly | Needs manual work |
|---|---|
padding: 16px → p-4 | :hover / :focus → hover: / focus: prefixes |
display: flex → flex | @media queries → sm: md: lg: prefixes |
color: #fff → text-white | Custom theme colors (tool can’t see your config) |
| Most static rules | Grid templates, animations |
Pseudo-classes and media queries don’t appear in a plain CSS rule the way Tailwind wants them, so you’ll add those prefixes yourself after converting.
The arbitrary-value smell
Arbitrary values (grid-cols-[200px_1fr], bg-[#1a2b3c]) are Tailwind’s pressure-release valve, but heavy use is a code smell — it means your styles aren’t speaking your design system’s language. The disciplined workflow after a bulk conversion:
- Map to scale. Round one-off spacings/sizes to the nearest theme step.
- Promote repeats. A value used in many places belongs in
tailwind.config.jsas a token, not pasted as an arbitrary value everywhere. - Use
@applysparingly. For a repeated cluster of utilities,@applyin a component class can help — but overusing it just recreates the CSS you were trying to leave.
CSS → Tailwind and back
The reverse direction (Tailwind → CSS) is handy for understanding what a string of utilities actually does, or for extracting styles out of Tailwind if you’re migrating away. It expands each class into its declaration inside a selector block. Either direction, the conversion runs entirely in your browser — your styles and class lists never leave the page. Treat the output as a well-informed first draft, then reconcile it with your theme so the result is consistent rather than a pile of arbitrary values.