Converters

CSS Unit Converter

Convert between px, pt, pc, in, cm, mm, em, rem and % for a given root font size.

Value to convert

Used for em, rem and %.

Absolute and relative units

CSS lengths split into two families. Absolute units are fixed: 1in = 96px, 1pt = 1/72in, 1pc = 12pt, and 1cm = 96/2.54 px. Relative units scale with font size: 1rem is the root font size, 1em is the current element's font size, and 100% equals 1em. Because em, rem and % depend on context, set the root font size to match your design (the browser default is 16px).

Which to use

Prefer rem for type and spacing so everything scales with the user's chosen font size — better for accessibility than fixed px. Use px for hairline borders, pt/cm/mm mainly for print stylesheets. This converter pivots through pixels, so the figures assume the standard 1in = 96px reference used by browsers.

These calculators run entirely in your browser — nothing you type is sent anywhere. Results are estimates for planning; validate against your vendor's documentation before you buy or deploy.