How to convert CSS to Tailwind classes
Migrating hand-written CSS to Tailwind is mostly mechanical: padding becomes p-*, display: flex becomes flex, and font-size: 16px becomes text-base. The parts that are not mechanical (shadows, transitions, anything with a selector) are where the actual thinking is, so the useful thing a converter can do is get the boring 80% out of the way and tell you plainly about the rest.
Paste declarations and this tool emits the utility classes it can map, and lists everything it cannot. It runs in the browser and assumes the default Tailwind theme.
- Paste the CSS declarations from one rule. Braces and comments are stripped, selectors are ignored.
- Read the Tailwind classes output and copy it onto your element.
- Check the Unmapped properties panel. Those need a human, and they are usually shadows, transitions, and transforms.
- Replace any arbitrary values in square brackets, particularly colours, with tokens from your own theme.