Free Micro-Tool · 100% In-Browser · No Sign-Up

CSS to Tailwind CSS Converter

Paste a CSS rule or a bare declaration block. This tool maps it to Tailwind v3/v4 utility classes for layout, flexbox, grid, spacing, sizing, typography, colors, borders, radius, shadows, opacity, and position — falling back to Tailwind's arbitrary-value syntax (p-[18px]) when there's no exact scale match, and flagging properties it doesn't support instead of guessing.

Paste CSS

Rule block or bare declarations

Tailwind Classes

Copied!
Paste CSS on the left, or click a preset above.
No unsupported properties yet.

This converter is a free tool from SpecPeek — the local-first CSS, Tailwind & SVG inspector for Chrome and Edge. It never sends your CSS anywhere; the same privacy bar applies to the full extension.

Add to Chrome — Free
FAQ

What this converter does and doesn't do

Does it work with Tailwind v4?

Yes. The utility class names it outputs (spacing, color, sizing, typography scales) are unchanged between Tailwind v3 and v4. Arbitrary-value syntax like px-[18px] works in both versions.

Why do some colors come out as bg-[#6b21a8] instead of a named color?

The converter only maps a hex to a named Tailwind color (like bg-indigo-500) when it has an exact, verified match in the default palette. Anything else safely falls back to arbitrary-value syntax rather than guessing the wrong shade.

What happens to properties it can't convert?

Properties like transition, transform, or cursor aren't mapped to a fixed utility set here, so they're listed under "Unsupported properties" instead of being silently dropped or guessed.

Is my CSS uploaded anywhere?

No. The entire conversion runs in a script in this page — there's no network request, server, or analytics call involved. Closing the tab clears everything.