CSS Unit Converter

Convert px, pt, pc, inches, cm, and mm with CSS factors.

Unit ConvertersUpdated 2026-10-102 min read
CSS Unit Converter
Converted
...

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

  1. Enter the value in the source unit.
  2. Pick the source unit on the left and the target on the right.
  3. Read the converted line first.
  4. Scan the all units note for the rest.
  5. Use relative em or rem for scalable layouts instead.

Formula

To pixels: px = value x factor(from). Result = px / factor(to). Factors in px: pt 1.33333333, pc 16, in 96, cm 37.79527559, mm 3.779527559.
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.

  1. Pixels first: 12 x 1.33333333 = 16 px.
  2. Target is pixels, so 16 px stands.
  3. Result: 12 pt = 16 px.
  4. Check: 16 / 1.33333333 = 12.00000075 pt back.
  5. Body copy pairing confirmed: 12 pt with 16 px.

Reference table

One inch in every unit
UnitPer inchNote
px96CSS reference pixel
pt72Print standard
pc612 pt each
cm2.54Exact
mm25.4Exact

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.

Sources

How this page was checked. The formula above was matched against the cited sources, and the worked example was run through the tool on this page before publishing. If you spot an error, contact us so we can fix it and note the correction.