Close Menu
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn WhatsApp Telegram
Saturday, August 22
  • About
  • Contact
  • Advertise
  • Disclaimer
  • Privacy Policy
  • Editorial Policy
  • Tools
  • Games
JustwebworldJustwebworld
  • People
  • Sports
  • Culture
  • Lifestyle
  • Food
  • Travel
  • Health
  • Tech
  • Business
  • Money
  • Digital
  • Gaming
  • Auto
  • Fashion
  • Home
  • Mind
  • Learn
JustwebworldJustwebworld
Home » Tools » Tailwind v3 to v4 Converter

Tailwind v3 to v4 Converter

Michael Austin

Migrate Tailwind v3 code toward v4: rename utilities per the official upgrade guide (shadow-sm→shadow-xs, ring→ring-3, outline-none→outline-hidden…) and convert theme config objects into v4 @theme CSS.

What actually changes between v3 and v4

Tailwind v4 is a rewrite: configuration moved from JavaScript into CSS (@theme), the default palette moved to OKLCH, and a set of utilities were renamed — the size scales for shadow, blur and rounded each shifted down one step (v3’s shadow-sm is v4’s shadow-xs, bare shadow became shadow-sm), outline-none became outline-hidden, bare ring became ring-3, gradients moved from bg-gradient-to-r to bg-linear-to-r, and flex-shrink/flex-grow shortened to shrink/grow.

Two conversion modes

Classes mode applies that rename table to any markup or class list, preserving variants (hover:shadow → hover:shadow-sm) and reporting every change. Config mode takes the theme object from tailwind.config.js and emits the equivalent @theme block — colors to --color-*, borderRadius to --radius-*, fontSize to --text-*, screens to --breakpoint-*.

Worked example

v3:  <button class="rounded shadow-sm ring outline-none">
v4:  <button class="rounded-sm shadow-xs ring-3 outline-hidden">

Honest limitations — read before shipping

  • Config mode converts data, not code: plugins, presets, functions and require() are reported as out of scope, never guessed at.
  • Deprecated patterns like bg-opacity-50 are flagged for manual migration to the slash syntax (bg-black/50) rather than auto-rewritten.
  • v4 also changes silent defaults — border/divide color is now currentColor, ring width 1px — which no textual converter can catch. Do a visual pass.
  • For a full project migration, the official codemod npx @tailwindcss/upgrade is the right tool; this converter is for understanding the mapping and migrating snippets.

How to use the Tailwind v3 to v4 Converter

  1. Choose the mode: utility classes in markup, or a theme config object.
  2. Paste your v3 classes/HTML — or the theme part of tailwind.config.js.
  3. Click "Convert to v4".
  4. Review the rename list and the manual-migration warnings before shipping.

Frequently asked questions

Which class renames does it apply?

The rename table from the official v4 upgrade guide: the shadow/blur/rounded scale shift (shadow-sm→shadow-xs, shadow→shadow-sm, same for blur and rounded), outline-none→outline-hidden, ring→ring-3, bg-gradient-to-*→bg-linear-to-*, and flex-shrink/flex-grow→shrink/grow — variants preserved.

What does config mode produce?

A v4 @theme CSS block: colors become –color-*, spacing –spacing-*, borderRadius –radius-*, fontSize –text-*, screens –breakpoint-* and so on. Sections without a direct @theme namespace are listed as skipped instead of silently dropped.

Can it convert my whole tailwind.config.js?

Only the data: plugins, presets, content globs and any JavaScript (functions, require()) are out of scope and reported honestly. For a real project migration, the official codemod — npx @tailwindcss/upgrade — is the right tool; this converter is for understanding the mapping and migrating snippets by hand.

Is renaming classes all v4 migration takes?

No — v4 also changes defaults with no textual marker, like border and divide color defaulting to currentColor and ring width becoming 1px. After renames, a visual pass over the UI is still required; the tool says so on every run.

Related Tailwind CSS tools

  • Previous step: Tailwind Class Cleaner — Clean a Tailwind class list: exact duplicates removed and conflicting utilities (two paddings, two display modes, two text colors) resolved last-wins — with a report of everything removed.
  • Next step: Tailwind Theme Generator (v3 config + v4 @theme) — Build a complete Tailwind theme starter — primary and secondary color scales, font stack and radius scale — exported as a v4 @theme block or a v3 tailwind.
  • Tailwind Class Validator — Check a class list or markup for typos: every class is tested against Tailwind's core utility grammar, with unknown classes, bad variants and arbitrary values reported separately.

cards
Powered by paypal
Follow on WhatsApp Follow on Telegram
Share. Facebook Twitter Pinterest LinkedIn Tumblr Telegram WhatsApp Copy Link
Previous ArticleTailwind Theme Generator (v3 config + v4 @theme)
Next Article Tailwind Class Validator
Michael Austin
  • Website
  • Facebook
  • X (Twitter)
  • Pinterest
  • Instagram
  • LinkedIn

Michael Austin is the current owner of Justwebworld and manages the platform’s editorial direction, content strategy, and digital publishing operations. With a strong interest in online media and modern publishing, he focuses on creating informative, engaging, and easy-to-understand content across multiple categories.Under his leadership, Justwebworld continues to grow as a trusted multi-niche digital publication covering technology, business, lifestyle, automotive, sports, travel, and trending internet topics for readers worldwide.

Related Posts

How Older Adults Can Prepare Their Families for the Future

What Makes a Business Website Effective in 2026

The Rise of Mixed-Use Waterfront Communities

4 Zesty Board Games That Start With Z

3 Notable Board Games That Start With X

6 Wonderful Board Games That Start With W

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 41.9K other subscribers
Categories
Latest Posts

How Older Adults Can Prepare Their Families for the Future

What Makes a Business Website Effective in 2026

The Rise of Mixed-Use Waterfront Communities

4 Zesty Board Games That Start With Z

3 Notable Board Games That Start With X

6 Wonderful Board Games That Start With W

3 Varied Board Games That Start With V

3 Unusual Board Games That Start With U

8 Top Board Games That Start With T

10 Superb Board Games That Start With S

The content on this website is provided solely for educational and informational purposes. We do not promote, endorse, or deal in any products, services, or activities mentioned. While we strive to share accurate and up-to-date information, we make no warranties regarding completeness, reliability, or accuracy. Any action you take based on the information found here is strictly at your own risk, and we will not be liable for any losses or damages in connection with the use of our website.

DMCA.com Protection Status
Justwebworld

Explore knowledge, feed curiosity — trusted by readers since 2012.

Explore Topics
TechBusinessDigitalMoneyLearnPeopleLifestyleCultureHealthHomeTravelGamingFashionAutoFoodMindLawSportsShoppingAI
Popular Tools
Age CalculatorWord CounterCase ConverterLove CalculatorReading TimePeriod CalculatorNumber to WordsAngel NumberHarry Potter NameDemon NameKingdom NameAll Tools →
Popular Games
Bubble BlastSudokuTruth or Dare WheelYes / No WheelAll Games →
Facebook X (Twitter) Instagram Pinterest YouTube Tumblr LinkedIn WhatsApp Telegram Threads RSS
  • About
  • Contact
  • Advertise With Us
  • Disclaimer
  • Privacy Policy
  • Terms & Conditions
  • Editorial Policy
  • Write for Us
Copyright © 2012-2026. Justwebworld - All Rights Reserved. | Sitemap

Type above and press Enter to search. Press Esc to cancel.