Typography
font-size to Tailwind
Sizes are named rather than numeric —text-sm, not text-14 — so the scale is a closed set and an off-scale size becomes an arbitrary value.The 13 mappings below are read straight out of Tailwind v4.3.3, not maintained by hand, so this is what the converter will actually produce for font-size.
font-size values and their classes
| CSS | Tailwind |
|---|---|
| font-size: 0.75rem; | text-xs |
| font-size: 0.875rem; | text-sm |
| font-size: 1rem; | text-base |
| font-size: 1.125rem; | text-lg |
| font-size: 1.25rem; | text-xl |
| font-size: 1.5rem; | text-2xl |
| font-size: 1.875rem; | text-3xl |
| font-size: 2.25rem; | text-4xl |
| font-size: 3rem; | text-5xl |
| font-size: 3.75rem; | text-6xl |
| font-size: 4.5rem; | text-7xl |
| font-size: 6rem; | text-8xl |
| font-size: 8rem; | text-9xl |
Values that are not on the scale
Anything without a named class is written as an arbitrary value in square brackets. The converter falls back to this rather than rounding your CSS to the nearest class, because silently changing a value is worse than an ugly class name.
text-[your value]Other typography properties
Converting a whole stylesheet?
Paste it into the converter and get every rule at once, shorthands expanded, media queries turned into breakpoint variants, and the parts that have no Tailwind equivalent flagged rather than dropped.
Open the converter