CSS Unit Converter
Convert px, pt, pc, inches, cm, and mm with CSS factors.
What it does
CSS absolute units anchor to the pixel: 96 px make one inch, with points, picas, centimeters, and millimeters defined from that inch. Print stylesheets think in points while screens think in pixels, and this bridge moves between them.
The tool above converts between six units: px, pt, pc, in, cm, and mm. Pick both ends, enter the value, and the answer updates with every equivalent below it.
The default of 12 pt converts to 16 px (12 x 96/72), the classic body text pairing. An inch reads 96 px, 72 pt, 6 pc, 2.54 cm, or 25.4 mm by the same fixed ratios.
Factors follow W3C CSS Values specifications with MDN unit references matching them. Both fix the inch at 96 px; device pixels scale separately through zoom and density.
How to use
- Enter the value in the source unit.
- Pick the source unit on the left and the target on the right.
- Read the converted line first.
- Scan the all units note for the rest.
- Use relative em or rem for scalable layouts instead.
Formula
- 96
- CSS pixels per inch, fixed by spec.
- 1.3333
- Pixels per point (96/72).
- hub
- Pixels as the single middle step.
Relative units (em, rem, %) depend on context and cannot convert absolutely, so they stay out. Device pixels differ from CSS pixels under zoom and retina scaling.
Worked example
Example: 12 pt to px
Value 12, from points, to pixels.
- Pixels first: 12 x 1.33333333 = 16 px.
- Target is pixels, so 16 px stands.
- Result: 12 pt = 16 px.
- Check: 16 / 1.33333333 = 12.00000075 pt back.
- Body copy pairing confirmed: 12 pt with 16 px.
Reference table
| Unit | Per inch | Note |
|---|---|---|
| px | 96 | CSS reference pixel |
| pt | 72 | Print standard |
| pc | 6 | 12 pt each |
| cm | 2.54 | Exact |
| mm | 25.4 | Exact |
Limits
- Absolute units only; em, rem, and % need context.
- CSS pixels, not device pixels under zoom.
- Print output follows printer DPI after conversion.
- Viewport units (vw, vh) need window size.
Common mistakes
- Using 72 px per inch from old Mac lore.
- Converting em without knowing the base size.
- Setting print points as screen pixels directly.
- Rounding mid chain across stylesheets.
- Expecting device pixels to match CSS pixels on retina.
Try it yourself
Quick checks. Answers sit tucked under each question.
96 px in inches?
96 / 96 = 1 in.
2 inches in px?
2 x 96 = 192 px.
72 pt in px?
72 x 1.33333333 = 96 px = 1 in.
Questions
How many px in a point?
1.3333 px (96/72). So 12 pt is 16 px.
pt or px for web?
px for screens, pt for print stylesheets. Convert when crossing.
What is a pica?
12 points: 16 px. Six picas make an inch.
Are CSS pixels real pixels?
Reference pixels. Devices scale them by zoom and density.
Why 96 per inch?
W3C fixed it for predictable print mapping from screens.
What about em?
Relative to font size, so no absolute conversion exists.