Preview
Typography is the craft of making language visible. A good line length and generous leading let the eye glide from one line to the next without losing its place.
| px | rem | em | pt | vw | Line-height |
|---|---|---|---|---|---|
| 10 | 0.625 | 0.625 | 7.5 | 0.694 | 1.7 |
| 12 | 0.75 | 0.75 | 9 | 0.833 | 1.65 |
| 13 | 0.8125 | 0.8125 | 9.75 | 0.903 | 1.63 |
| 14 | 0.875 | 0.875 | 10.5 | 0.972 | 1.6 |
| 15 | 0.9375 | 0.9375 | 11.25 | 1.042 | 1.57 |
| 16 | 1 | 1 | 12 | 1.111 | 1.55 |
| 18 | 1.125 | 1.125 | 13.5 | 1.25 | 1.52 |
| 20 | 1.25 | 1.25 | 15 | 1.389 | 1.5 |
| 24 | 1.5 | 1.5 | 18 | 1.667 | 1.4 |
| 28 | 1.75 | 1.75 | 21 | 1.944 | 1.32 |
| 32 | 2 | 2 | 24 | 2.222 | 1.25 |
| 36 | 2.25 | 2.25 | 27 | 2.5 | 1.23 |
| 40 | 2.5 | 2.5 | 30 | 2.778 | 1.2 |
| 48 | 3 | 3 | 36 | 3.333 | 1.15 |
| 56 | 3.5 | 3.5 | 42 | 3.889 | 1.13 |
| 64 | 4 | 4 | 48 | 4.444 | 1.1 |
| 72 | 4.5 | 4.5 | 54 | 5 | 1.09 |
| 96 | 6 | 6 | 72 | 6.667 | 1.05 |
Text grows smoothly between two viewport widths and stays fixed outside them.
font-size: clamp(1rem, 0.8239rem + 0.7512vw, 1.5rem);
The quick brown fox
Convert between px, rem, em, pt, %, and vw using your own root and parent font sizes, and get a recommended line height and line length for any size. The page also builds a modular type scale and a fluid clamp() rule for responsive text.
Set the Root font size, Parent font size, and Viewport width under Context.
Type a value into any box in Converter; the other units follow.
Read the Recommended line-height and Comfortable line length for that size.
Optional: build a Type scale from a ratio, or a Fluid type with clamp() rule, and copy the CSS.
1rem equals the root (<html>) font size, which browsers set to 16 px by default. Change Root font size if your site uses a different base.
rem is relative to the root font size; em and % are relative to the parent element's font size. Set Parent font size to convert em correctly.
It follows common typographic practice: about 1.5 for body text and tighter leading for large headings. A version snapped to a 4 px grid is shown as well.
It writes a font-size that grows smoothly between a min and max size across two viewport widths and stays fixed outside them. Simulate viewport width shows the result at any width.
Yes. pt uses the CSS ratio of 72 pt to 96 px, so 12 pt equals 16 px.