Toolman

CSS unit converters

72 conversions between the CSS length units, each with a live converter that respects your project's root font size.

The units

UnitTypeIn pixels (16 px base)
pxAbsolute1 px
remRelative16 px
emRelative16 px
ptAbsolute1.3333 px
pcAbsolute16 px
inAbsolute96 px
cmAbsolute37.7953 px
mmAbsolute3.7795 px
%Relative0.16 px

Absolute vs relative

Absolute units (px, pt, pc, in, cm, mm) always render at the same size regardless of context. Relative units (rem, em, %) are computed from a font size — the root element for rem, the current element for em and percent — which is what makes them respond to user preferences and to a responsive type scale.

The accessibility argument for rem

When a visitor raises their browser's default font size, text sized in px does not move. Text sized in rem does. That single difference is why almost every modern design system expresses type and spacing in rem and reserves px for borders and one-pixel details.

All conversions