CSS to Tailwind Reference

Look up bundled Tailwind utilities or map declarations from one plain CSS selector block.

On-device No sign-up Free to use

Inspect input controls

Showing an example. Edit to see your own.

?

Up to 10,000 UTF-8 bytes and 100 declarations. Use bare declarations or one plain selector block. Finite values only; no media queries, comments, custom properties or !important.

?

Used for reference lookup; up to 100 UTF-8 bytes.

Processed in your browser. Your inputs stay on this device.

Result

Showing an example.

Map a flex row’s alignment, gap and padding using the pinned default theme.

flex items-center gap-4 p-4
All four declarations map in the pinned Tailwind CSS 4.1.0 reference; a custom theme can change spacing values.

Loading the tool. Your result will appear here.

https://usefreetools.net/css-to-tailwind-reference · 20 November 2026

Was this helpful?

How to use CSS to Tailwind Reference

  1. Choose Convert finite CSS declaration subset or Search pinned utility reference.
  2. For conversion, enter declarations such as display: flex; gap: 1rem;, optionally inside one plain selector block. For lookup, enter a property, value or utility such as gap.
  3. Read mapped and unsupported rows. Copy the generated classes or download the class text and mapping JSON for conversion; lookup exports its reference rows as JSON.
  4. Compare the result in your Tailwind project, including its theme, root font size and interactions with other classes.

Example: CSS to Tailwind Reference

Map a flex row’s alignment, gap and padding using the pinned default theme.

You add
Operation: convert; CSS declarations: display: flex; align-items: center; gap: 1rem; padding: 1rem;; Reference property, value or utility: gap
You get
flex items-center gap-4 p-4 All four declarations map in the pinned Tailwind CSS 4.1.0 reference; a custom theme can change spacing values.

Options

Operation
Conversion maps supported declarations to the pinned default utilities. Reference lookup searches that finite mapping instead of converting a whole stylesheet.
Theme assumptions
Check the default theme and rem basis before using a utility. A custom theme, plugin or conflicting shorthand can change its actual effect.
CSS declarations
Up to 10,000 UTF-8 bytes and 100 declarations. One plain selector block can contain the declarations, but its selector is not converted. Comments, media rules, custom properties and !important are refused.
Reference property, value or utility
Used for reference lookup; up to 100 UTF-8 bytes.

Supported inputs and limits

  • 189 finite mappings pinned to Tailwind CSS 4.1.0 default assumptions, with a 0.25rem spacing unit.
  • Supports declaration lists or one plain selector block as a container; the selector itself is not translated.
  • Conversion accepts up to 10,000 UTF-8 bytes and 100 declarations, and lookup accepts up to 100 UTF-8 bytes.
  • Repeated properties and conflicting padding/margin/gap shorthands are refused so class order does not imply CSS source-order equivalence.
  • Unmapped declarations remain explicit in the table and JSON.
More details

Multiple rules, media queries, comments, important modifiers, custom themes and plugins need separate work.

There is no arbitrary-value fallback or full stylesheet/reverse compiler.

Root font size and theme changes can alter the rendered result.

Where your input is processed

This tool does not upload your inputs. See the limits for anything saved on your device.

Review unmapped declarations explicitly

Keep an unsupported declaration in the review list instead of assuming it has been represented by another class. Selectors, media rules and important modifiers require a separate conversion decision. Compare the final element in your own Tailwind project; a matching default mapping does not guarantee the same cascade or dimensions there.

Questions about CSS to Tailwind Reference

Will these classes match a customized theme?

Not necessarily. The mappings use the pinned default theme.

Can a complete stylesheet be converted?

No. Selectors, nested rules and unsupported declarations require manual work.

Is the reference always current?

No. It identifies its pinned Tailwind version rather than claiming to track new releases.

Page updated · Project managed by Tony Hines · Report a problem with CSS to Tailwind Reference