Last updated: 28 January 2026

Tailwind CSS Text Transform

Change text casing in Tailwind CSS with uppercase, lowercase, capitalize, and normal-case utilities. Includes responsive text transform examples.


Text transform utilities in Tailwind CSS let you control the capitalization of text without changing the actual content. Whether you need all-caps headings, lowercase labels, or title-cased names, these classes handle it purely through CSS so your source text stays clean and readable.

How to Apply Tailwind Text Transform

Tailwind provides four text transform utilities:

  • uppercase - Converts all characters to uppercase. Great for headings, buttons, and labels.
  • lowercase - Converts all characters to lowercase. Useful for normalizing user input displays.
  • capitalize - Capitalizes the first letter of each word. Works well for names or titles.
  • normal-case - Resets text to its original casing. Used to override inherited transforms.
html
<p class="uppercase">this text becomes uppercase</p>
<p class="lowercase">THIS TEXT BECOMES LOWERCASE</p>
<p class="capitalize">this text gets capitalized</p>
<p class="normal-case">This Text Stays As Written</p>

Preview

this text becomes uppercase
THIS TEXT BECOMES LOWERCASE
this text gets capitalized
This Text Stays As Written

Uppercase Headings and Buttons

The uppercase class is the most commonly used text transform. It works especially well for buttons, badges, navigation links, and section headings where you want a strong visual presence.

html
<button class="uppercase tracking-wide bg-blue-600 text-white px-6 py-2 rounded font-semibold text-sm">
Subscribe now
</button>
<span class="uppercase text-xs font-bold tracking-wider text-green-700 bg-green-100 px-2 py-1 rounded">
New
</span>

Preview

New

Pair uppercase with tracking-wide or tracking-wider for better readability. All-caps text with tight letter spacing can look cramped.

Capitalize for Names and Titles

The capitalize class transforms the first letter of every word to uppercase. This is useful when displaying user-generated content like names or titles where consistent formatting matters.

html
<h3 class="capitalize text-xl font-semibold">john doe - software engineer</h3>
<div class="capitalize text-gray-700">
welcome to our platform, dear user
</div>

Preview

john doe - software engineer

welcome to our platform, dear user

Keep in mind that capitalize only affects the first letter of each word. It will not lowercase the remaining letters, so "jOHN" becomes "JOHN" visually.

Resetting with Normal Case

The normal-case utility removes any inherited text transform. This is particularly useful when a parent element applies uppercase but a child element needs its original casing preserved.

html
<nav class="uppercase text-sm font-bold tracking-wider">
<a href="#" class="px-4">Home</a>
<a href="#" class="px-4">About</a>
<a href="#" class="px-4 normal-case text-base font-normal tracking-normal">
Read our Blog
</a>
</nav>

Preview

Responsive Text Transform

Apply different text transforms at different breakpoints using responsive prefixes:

html
<h2 class="uppercase md:normal-case text-2xl font-bold">
Responsive Heading
</h2>
<p class="normal-case sm:capitalize lg:uppercase text-lg">
this text changes casing at each breakpoint
</p>

Preview

Responsive Heading

this text changes casing at each breakpoint

On mobile, the heading appears uppercase. On medium screens and above, it reverts to normal casing. This is useful when compact uppercase labels work on small screens but normal casing reads better on wider layouts.

Hover and State Variants

Text transform can be toggled on hover or focus:

html
<a href="#" class="normal-case hover:uppercase transition-all font-medium text-blue-600">
Hover to shout
</a>

Preview

Practical Pattern: Navigation Bar

html
<nav class="flex gap-8 bg-gray-900 px-6 py-4 rounded-lg">
<a href="#" class="uppercase text-xs font-bold tracking-widest text-white hover:text-blue-400">Home</a>
<a href="#" class="uppercase text-xs font-bold tracking-widest text-gray-400 hover:text-white">Products</a>
<a href="#" class="uppercase text-xs font-bold tracking-widest text-gray-400 hover:text-white">Pricing</a>
<a href="#" class="uppercase text-xs font-bold tracking-widest text-gray-400 hover:text-white">Contact</a>
</nav>

Preview

Uppercase navigation with wide tracking is a classic design pattern seen in many modern websites.

Tailwind Text Transform Class Table

ClassProperties
uppercasetext-transform: uppercase;
lowercasetext-transform: lowercase;
capitalizetext-transform: capitalize;
normal-casetext-transform: none;

Worth Reading

Windframe Tailwind blocks

Landing page

Windframe is an AI visual editor for rapidly building stunning web UIs & websites

Start building stunning web UIs & websites!

Build from scratch or select prebuilt tailwind templates