No. 23 of 23

Font size converter: pt, px, mm and em

Designers say 12 pt, developers write 16px or 1rem, and the print shop wants millimeters. It's the same size measured four ways. Enter a size in any unit, and set the base font size if you're working in em or rem.

Points–
Pixels–
Millimeters–
em / rem–
Percent of base–

Preview

The quick brown fox jumps over the lazy dog 0123

Key: / jumps to the first field

Results are for information only.

Common font sizes (16 px base)

Common font sizes (16 px base)
ptpxmmrem
682.120.5
79.332.470.583
810.672.820.667
9123.170.75
1013.333.530.833
10.5143.70.875
1114.673.880.917
12164.231
1418.674.941.167
1621.335.641.333
18246.351.5
2026.677.061.667
24328.472
2837.339.882.333
3242.6711.292.667
364812.73
486416.934
608021.175
729625.46

How to use it

  1. Type the size and pick its unit: points, pixels, millimeters or em/rem.
  2. If you work in em or rem, set the base size in pixels. Browsers start at 16 px.
  3. Read every equivalent and check the preview. Calibrate the on-screen ruler first if you want the preview at true physical size.

How it works

The CSS specification ties the units together through the inch: 1 in = 96 px = 72 pt = 25.4 mm. Points and millimeters are absolute. Em and rem are relative: they multiply whatever base font size is in effect, which browsers set to 16 px unless the reader or the stylesheet changes it.

pt = px × 0.75 · mm = px × 25.4 ÷ 96 · em = px ÷ base

Worked example

A print spec calls for 9 pt body text and you're building the web version on a 16 px base. 9 × 96 ÷ 72 = 12 px. In rem that's 12 ÷ 16 = 0.75rem, and on paper the em box is 12 × 25.4 ÷ 96 = 3.175 mm. Going the other way, a 24 px heading is 18 pt, 1.5rem and 6.35 mm.

Assumptions and limits

  • A CSS pixel isn't a device pixel. On a phone with a 3× screen, 16 CSS px covers 48 physical pixels, and how big that looks depends on the screen. That's why the preview needs a calibrated ruler to be true to size.
  • These are desktop-publishing (PostScript) points of 1/72 in. The older Didot point still used in some European print work is about 0.376 mm, roughly 7% bigger.
  • Font size sets the em box, not the height of the letters, so two typefaces at the same size can look quite different.
  • Some apps scale type with your display setting: at 125% scaling, 12 pt can show up as 20 px.

Frequently asked questions

How many pixels is 12 pt?

16 px. CSS fixes one inch at 96 px and 72 pt, so 1 pt is 1.333 px.

What's the difference between em and rem?

Both are multiples of a font size. 1rem always equals the root size (16 px unless you change it), while 1em equals the parent element's size, so em values compound when you nest them.

Are 12 pt letters 4.23 mm tall?

The em box is, the letters aren't. Capitals usually take up about 70% of it, so 12 pt capitals stand roughly 3 mm tall. The exact figure depends on the typeface.