← All text tools

CSS and Tailwind Converter

Converts CSS declarations to Tailwind utility classes for common properties, or to a JavaScript style object, and turns Tailwind classes back into plain CSS.

  • Free
  • No sign-up
  • Works on any device

About CSS and Tailwind Converter

Moving a stylesheet to Tailwind, or reading an unfamiliar class list, means translating by hand. This tool maps common declarations to Tailwind v3 utilities using the default theme: the 4px-based spacing scale, font sizes, weights, radii, flex and grid helpers, display and position keywords. Anything off the scale becomes an arbitrary value such as p-[13px], and properties with no utility become arbitrary properties. It also converts CSS to a camelCase JavaScript style object for React, and Tailwind classes back to CSS. Colour palette names are not guessed.

How to use CSS and Tailwind Converter

  1. Pick the direction: CSS to Tailwind, Tailwind to CSS, or CSS to a JavaScript style object.
  2. Paste the CSS declarations or rules, or the list of Tailwind classes.
  3. Copy the result and review the table that shows how each declaration was translated.

Why use this tool?

Also known as

Frequently asked questions

Does it convert colours like red-500?

It writes colours from CSS as arbitrary values such as bg-[#2563eb], because guessing palette names would risk wrong colours. White, black and transparent map to their own utilities.

Why does text-lg also change the line height?

In Tailwind each font size utility also sets a matching line height. The Tailwind to CSS direction outputs both values, so converting back and forth is not always an exact round trip.

Are hover: and md: variants supported?

No. Classes with variants are listed as not converted. Convert the base classes and write the pseudo-class or media query rules around them yourself.

Is CSS and Tailwind Converter free?

Yes. CSS and Tailwind Converter on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.