CSS to Tailwind Converter
Migrating a legacy CSS codebase to Tailwind is tedious. Every rule needs to be mentally translated from 'padding: 24px' to 'p-6', from 'display: flex' to 'flex', from 'box-shadow: 0 2px 8px...' to 'shadow-md'. This tool does the lookup for you. Paste any CSS rule block, get an ordered string of Tailwind utility classes ready to drop into your className attribute.
What It Maps
Full spacing scale — padding, margin, gap in pixels or rem, mapped to Tailwind's 4px-based scale (1=4px, 2=8px, 4=16px, 6=24px, etc.). Typography — font-size, font-weight (100-900), line-height, text-align, text-transform, text-decoration, font-style. Flex & Grid — display, flex-direction, justify-content, align-items, flex-wrap, grid-template-columns. Position & Size — position, top/right/bottom/left, width, height, min/max dimensions. Borders — width, style, color, radius with shorthand parsing. Arbitrary fallback — any value that doesn't match the scale gets wrapped in brackets: p-[13px], bg-[#f5a623].
Frequently Asked Questions
Built by Derek Giordano · Part of Ultimate Design Tools