Toolman 100% local

CSS unit converters

Convert between any two CSS length units. rem, em and % are worked out from the root font size, which you can set to match your project.

Runs on your devicenothing is uploadedHow to check

More detailsThe units · Absolute vs relative · The accessibility argument for rem

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.