Tailwind CSS v3 to v4 Migrator
Paste HTML, JSX or CSS that uses Tailwind v3 and get it rewritten for v4, with renamed utilities, new directives and a report of changes that still need manual work.
Use the tool
Why this tool exists
Tailwind v4 renamed a surprising number of everyday utilities. Plain shadow became shadow-sm, rounded became rounded-sm, outline-none became outline-hidden, gradients moved to bg-linear, and the important marker went to the end of the class. In a large codebase, finding every one by hand is tedious and the visual differences are subtle.
This migrator applies the renames from the official upgrade guide to whatever you paste, rewrites the tailwind directives to a single import and converts layer utilities to the new utility syntax. It also lists what cannot be automated, such as opacity utilities and the config file. Treat it as a first pass and review the diff. The text stays in your browser.
How to use it
- Paste your HTML, JSX or CSS that uses Tailwind v3 into the input box.
- Read the converted output and the list of changes it reports.
- Compare the result with your original using a diff tool.
- Handle the items under the manual-changes report yourself, then run your own build and visual checks.
Frequently asked questions
Does it replace the official upgrade tool?
No. It follows the upgrade guide for class and directive renames, but it cannot read your config file or project. Use the official tool for whole projects and this one to check snippets.
What can it not convert?
Things that depend on context, such as opacity utilities, the new default border colour and your tailwind.config file. These are listed in a report so you can address them by hand.
Can it rename a class that is part of my own CSS?
It works on text patterns, so a class of your own with the same name as a Tailwind utility can be changed too. Review the output before you apply it.