About this tool
Paste a Tailwind v3 config and get the v4 CSS file, with every theme value moved into @theme, plugins and dark mode converted to their v4 directives, and a list of anything that needs doing by hand. The Class names tab updates renamed utilities in your markup. Everything runs in your browser.
Why use this instead of migrating by hand?
How to use it
Renamed and removed classes in v4
| Tailwind v3 | Tailwind v4 |
|---|---|
shadow-sm | shadow-xs |
shadow | shadow-sm |
rounded-sm | rounded-xs |
rounded | rounded-sm |
blur-sm | blur-xs |
blur | blur-sm |
ring | ring-3 |
outline-none | outline-hidden |
flex-grow | grow |
flex-shrink-0 | shrink-0 |
overflow-ellipsis | text-ellipsis |
bg-black bg-opacity-50 | bg-black/50 |
!flex | flex! |
bg-[--brand] | bg-(--brand) |
From Tailwind's official upgrade guide. The radius change applies to every side too: rounded-t becomes rounded-t-sm.
A config, before and after
// tailwind.config.js (v3)
module.exports = {
darkMode: 'class',
theme: {
extend: {
colors: { brand: { 500: '#8b5cf6' } },
screens: { '3xl': '1920px' },
},
},
plugins: [require('@tailwindcss/typography')],
}/* app.css (v4) */
@import "tailwindcss";
@plugin "@tailwindcss/typography";
@theme {
--color-brand-500: #8b5cf6;
--breakpoint-3xl: 1920px;
}
@custom-variant dark (&:where(.dark, .dark *));Things worth knowing
Frequently asked questions
How does tailwind.config.js map to Tailwind v4?
In v4 the theme lives in CSS. Each theme key becomes a variable namespace inside @theme: colors become --color-*, fontFamily --font-*, fontSize --text-* with --text-*--line-height, screens --breakpoint-*, borderRadius --radius-*, boxShadow --shadow-*, and keyframes move inside @theme next to --animate-*. Plugins become @plugin, darkMode class becomes @custom-variant dark, and the three @tailwind lines become @import "tailwindcss". Keys that replaced a whole scale (theme instead of theme.extend) start with a reset such as --color-*: initial.
Is this the same as the official npx @tailwindcss/upgrade tool?
It covers the same config mappings and class renames, but works differently. The official tool runs in your project, needs Node 20 or newer and a clean git branch, and rewrites every file at once, which is the right choice for a whole repository. This page is for checking a config before you commit, migrating on a machine without Node 20, or converting one component. You can use both: preview here, then run the official tool.
Which Tailwind classes were renamed in v4?
The small end of several scales moved down a step: shadow-sm is now shadow-xs and shadow is now shadow-sm, and the same applies to rounded, blur, drop-shadow and backdrop-blur. outline-none became outline-hidden, ring became ring-3 because the default ring is now 1px, flex-grow and flex-shrink became grow and shrink, and the opacity utilities such as bg-opacity-50 were removed in favour of the slash syntax bg-black/50. The Class names tab applies all of these in one pass, so shadow never turns into shadow-xs by being renamed twice.
Does it work with shadcn/ui configs?
Yes. shadcn/ui colours such as hsl(var(--primary)) and radii such as calc(var(--radius) - 2px) point at your own CSS variables, so they are written into an @theme inline block. That makes utilities like bg-primary use the value directly instead of a nested variable. The accordion keyframes and animations move into @theme, and tailwindcss-animate becomes an @plugin line.
Why does my site look different after upgrading to v4?
Usually because v4 changed some defaults rather than class names. Borders now default to the current text colour instead of gray-200, the default ring is 1px and currentColor instead of 3px blue, placeholders use the text colour at half opacity, buttons use the default cursor instead of a pointer, and dialog margins are reset. Each of these has an official snippet that restores the v3 behaviour; tick them under Keep v3 defaults to add them to your CSS. Spacing utilities like space-y-4 also use a different selector now, which can change lists that wrap.
Is my config uploaded anywhere?
No. The conversion runs entirely in your browser and the config is parsed as text, never executed, so nothing in it can run. Nothing is sent to a server or stored in the page address, which makes it safe for private client and company configs.
Related tools
Premium upgrade · Untitled UI
AffiliateBuilding a whole Tailwind app, not just this component?
- Pro: 5,000+ components & sections
- One licence from $349, teams from $999
Affiliate link: we may earn a commission at no extra cost to you.
Untitled UI Pro: 5,000+ React + Tailwind CSS v4 components · from $349 one-timeGet Untitled UI Pro →Affiliate link