Code · Made a little simpler

CSS to Tailwind Converter

Paste declarations or a stylesheet. Convert known properties, spacing and colors to Tailwind v3.4 or v4.3 utilities, use arbitrary values, and export class text or an HTML or JSX attribute.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

CSS to Tailwind Converter: how to use it

  1. Paste CSS declarations or open a local CSS file. Select the default Tailwind version used by your project.
  2. Choose class text, HTML or JSX, then convert. Review the results for each selector, its supported state and any default breakpoint.
  3. Copy or download the suggested classes. Keep flagged CSS for custom selectors and conflicting declarations, and check the migrated component in your project.

Limits and notes

Reads up to 32,000 UTF-16 code units and 256 declarations. Supports distinct simple selectors, supported states and built-in media breakpoints. Nested selectors, custom breakpoints, imports and project configuration require separate review. Source and output stay in the browser.

How your privacy works →

CSS to Tailwind Converter: common questions

Can I paste declarations without a selector?

Yes. The result is one class list you can apply to the intended element.

Why is a valid CSS value in square brackets?

Square brackets let Tailwind represent an exact value or property outside the selected version's standard utility scale. Clear the arbitrary syntax setting to view only standard mappings.

What happens to rules that write the same property twice?

The converter flags competing declarations within the same selector and condition. Keep that CSS or resolve the cascade before assigning a replacement class list.

When should I choose Tailwind v4.3?

Choose the version used by the project receiving your classes. The default color values, responsive units and important syntax can differ.

Guides