Free developer tools Runs locally

CSS to Tailwind Converter

Turn pasted CSS into Tailwind classes or React JSX. Convert HEX, RGB, HSL, and OKLCH, then check text contrast against WCAG 2.1 and 2.2.

01 CSS converter

Convert CSS to Tailwind

Tailwind version
Examples:
Declarations or a rule block
0 mapped 0 unmapped

Converts one selector plus matching min/max-width rules. Uses Tailwind’s default theme; custom values may use brackets.

02 Color lab

Color converter & WCAG contrast checker

Foreground
HEX
—
RGB
—
HSL
—
OKLCH
—
Background
HEX
—
RGB
—
HSL
—
OKLCH
—

Try #38bdf8, rgb(56 189 248), hsl(198 93% 60%), or oklch(0.75 0.14 233). Transparent colors are composited over white.

WCAG 2.1 / 2.2 contrast

—
  • AA Normal 4.5:1—
  • AAA Normal 7.0:1—
  • AA Large 3.0:1—
  • AAA Large 4.5:1—
Live text preview
Typography preview using the selected foreground and background colors Stay readable. Large bold example Normal text example

From pasted CSS to live sites

Inspecting a live site instead of pasting CSS by hand?

Get SpecPeek for Chrome — Free Forever hover HUD, 1-click Tailwind/JSX & DESIGN.md export, and ad-free pixel overlay QA ($39 Pro One-Time, 14-day refund).

Pro Solo Early Bird: 3 devices. Agency: $99 one-time, 5 devices.

Reference

Frequently asked questions

How do I convert CSS to Tailwind classes?

Paste CSS declarations or a rule block, then pick Tailwind v3 or v4. The converter uses built-in utilities where they fit, arbitrary values for custom styles, and lists what it could not convert.

What is a passing WCAG contrast ratio?

WCAG 2.1 and 2.2 require 4.5:1 for AA normal text and 7:1 for AAA normal text. Large text thresholds are 3:1 for AA and 4.5:1 for AAA. Large means at least 24 CSS pixels, or about 18.67 pixels when bold.

Does SpecPeek upload my CSS or colors?

No. The converter and checker run entirely in your browser. Your CSS and colors are never sent to a server.