Tailwind Class Sorter

Sort Tailwind utility classes into the canonical order used by the official prettier-plugin-tailwindcss. Useful when you can't run the plugin (legacy projects, ad-hoc edits, AI-generated snippets) but want the same consistent ordering.

How to use the Tailwind Class Sorter

Paste HTML or JSX with class / className attributes containing Tailwind utilities. The sorter rewrites each attribute's classes into canonical order (layout → spacing → sizing → typography → colors → effects → variants last). Output preserves all other markup unchanged.