CSS to Tailwind Utility Converter
Convert standard CSS rules into Tailwind spacing, layout, color & border classes for HTML or React JSX with zero signup.
Raw CSS Declarations
Tailwind Utility Classes
How Pixel & Rem Rules Map to Tailwind Scales
Tailwind uses a consistent 0.25rem (4px) step scale for padding, margin, width, height, and gaps—so padding: 24px converts cleanly to p-6 and 12px 16px shorthand converts to py-3 px-4. Non-standard pixel sizes preserve exact layout fidelity using arbitrary [...] classes.
Migrating Existing Stylesheets Into React / Next.js Components
Paste multi-rule CSS blocks directly from browser DevTools or legacy stylesheets, switch on JSX className, and copy utility groups per selector straight into React, Next.js, or shadcn/ui components without rewriting classes manually.
Included UI Building Blocks: Bento Card, Inputs & Navbars
Use the top Presets bar to jump directly to production Bento Cards, modern text inputs, sticky Flexbox navbars, and pill CTAs—then fine-tune border colors or spacing visually in our companion layout tools.
How to Use This Tool
- 1 Click a UI preset (Bento Card, Modern Input, Flex Navbar, Pill Button) or paste your CSS.
- 2 Inspect mapped Flexbox, spacing, border-radius, color, and typography utilities in real time.
- 3 Toggle JSX className if pasting into React / TSX components instead of plain HTML.
- 4 Click Copy Classes and check any custom non-utility rules listed underneath.