Esta página aún no está traducida al español, así que la mostramos en inglés.

CSS to Tailwind Converter

Paste CSS rules or declarations and get the equivalent Tailwind utility classes for each selector — including hover: states and arbitrary values like p-[13px].

Actualizado el

Tus datos nunca salen de tu ordenador. Todo se procesa localmente en tu navegador.

Cómo usar: CSS to Tailwind Converter

  1. Paste CSS rules (with selectors) or just declarations.
  2. Read the class list generated for each selector.
  3. Copy the classes into your HTML or JSX; review arbitrary values and replace them with theme tokens where it makes sense.

How values are mapped

Tailwind’s default spacing scale uses steps of 0.25 rem (4 px), so padding: 16px becomes p-4 and margin: 0 auto becomes my-0 mx-auto. Values that are not on the scale use arbitrary-value syntax: padding: 13px → p-[13px]. Typography, radii and weights map to their named steps:

CSSTailwind
display: flex; flex-direction: columnflex flex-col
gap: 16pxgap-4
font-size: 24px; font-weight: 700text-2xl font-bold
border-radius: 12pxrounded-xl
background-color: #7c5cffbg-[#7c5cff]
width: 100%w-full
.btn:hover { color: #fff }hover:text-white

Limits to know

  • Colors become arbitrary values; map them to your theme palette (for example bg-violet-500) afterwards — the CSS variables to Tailwind tool helps define a theme.
  • Properties without a utility are written as arbitrary properties: [mask-image:url(...)].
  • Media queries, complex selectors and animations need manual translation to md:, group-hover: and theme config.
  • !important becomes the ! prefix.

For one-off values, the Tailwind arbitrary value generator builds individual classes, and the Tailwind color generator creates full palettes.

También se busca como: css to tailwind, convert css to tailwind, tailwind converter, css to tailwind classes, tailwind css generator, migrate css to tailwind.

Herramientas que combinan con: CSS to Tailwind Converter

  • PX to REM Converter — Convert between pixels, rem and em with your own root font size — or paste a whole stylesheet and convert every px value in one go.
  • CSS Formatter — Turn a minified stylesheet into readable CSS with one property per line and properly nested @media blocks.
  • CSS Animation Generator — Design CSS animations on a real keyframe timeline.
  • CSS Keyframes Generator — A visual editor for @keyframes.

Preguntas frecuentes

Does it support Tailwind v4?
Yes. The generated utilities and arbitrary values work in Tailwind v3 and v4.
Why are colors written as bg-[#hex]?
Exact colors are kept as arbitrary values so nothing changes visually. Replace them with your theme colors when you have a palette.
Can it convert media queries?
Not automatically. Convert the rules inside a media query separately and add the right responsive prefix, such as md:.
¿Puedo instalar CSS to Tailwind Converter como aplicación web y utilizarla sin conexión?
Sí. CSS to Tailwind Converter es una aplicación web instalable (PWA): se instala desde el navegador, no se descarga desde una tienda de aplicaciones. Haz clic en «Instalar aplicación» en la parte superior de esta página en Chrome o Edge (Windows, macOS, Linux, ChromeOS) o, en Android, utiliza «Compartir» → «Añadir a la pantalla de inicio» en iPhone y iPad, o «Archivo» → «Añadir al Dock» en Safari 17+ en un Mac. A continuación, se abrirá en su propia ventana con su propio icono y, como se ejecuta íntegramente en tu navegador, seguirá funcionando sin conexión. Firefox en el ordenador de sobremesa no permite instalar aplicaciones web. Cómo funciona la instalación.

Herramientas relacionadas