Skip to main content

Tailwind Class Sorter

Organize your Tailwind classes in the recommended order instantly.
Paste your classes and get them sorted automatically.

Sorted classes will appear here...
Enter Tailwind classes to see sorted output

Sorting Order (Tailwind Recommended)

1. Layout

flex, grid, hidden, block

2. Flexbox/Grid

items-center, justify-between, gap-4

3. Spacing

p-4, m-2, mx-auto

4. Sizing

w-full, h-screen, max-w-md

5. Typography

text-lg, font-bold, leading-6

6-7. Backgrounds & Borders

bg-blue-500, rounded-lg, border

8-10. Effects & Transitions

shadow-lg, opacity-50, transition

11-12. Transforms & Interactivity

scale-110, cursor-pointer, select-none

Responsive & State Variants

Classes with responsive prefixes (sm:, md:, lg:) and state variants (hover:, focus:) are kept with their base class and sorted after non-prefixed versions.