CSS rem (rem)

Typography unit · Non-system units

All units Typography converter

The CSS rem is a font-relative length unit in the W3C CSS layout system, equal to the computed font size of a document's root html element. Its symbol is rem, short for root em. Under the universal 16-pixel default font size shipped by desktop and mobile browsers, 1 rem equals 16 CSS pixels, or 12 points.

Introduced in CSS Values and Units Level 3 and supported across mainstream browsers since the early 2010s, rem solved a notorious maintenance headache of the older em unit. Because em scales relative to an element's parent, nested components multiplied silently: a 0.9 em caption inside a 0.9 em card shrank to 0.81 em, and a third layer fell to 0.729 em. Anchoring every calculation to the single root element eliminated cascading drift.

The unit's greatest practical virtue is accessibility. Hard-coded px font sizes can override a reader's chosen browser text preference, whereas sizing headings, paragraphs and spacing in rem lets low-vision users raise their browser default from 16 px to 24 px and watch the entire interface scale harmoniously with its visual hierarchy intact.

Design systems routinely define modular type and spacing scales in rem: 0.875 rem (14 px) for captions, 1 rem (16 px) for body prose, 1.5 rem (24 px) for subheadings and 2.5 rem (40 px) for display titles, paired with 0.25 rem (4 px) spacing steps. An older habit set the root size to 62.5 per cent (10 px) for easy mental maths, though modern teams keep the 16-pixel root intact so third-party widgets do not shrink unexpectedly.

Because rem has no fixed physical magnitude outside a stylesheet, adjusting the root font size rescales an entire page at once — a clean lever for global density controls.

Conversion tables evaluate 1 rem at the standard 16-pixel browser default, where it aligns directly with one pica and twelve points.

One CSS rem equals 16 CSS pixels (at the standard 16-pixel browser default), 12 points, 1 pica, 1 CSS em, 240 twips, about 4.2333 CSS millimetres, or about 0.1667 CSS inches.

CSS rem conversion table

UnitSymbol1 CSS rem equals1 of these equalsConverter
CSS pixelpx16 px0.0625 remCSS rems to CSS pixels
Pointpt12 pt0.0833333333333 remCSS rems to Points
Picapc1 pc1 remCSS rems to Picas
CSS emem1 em1 remCSS rems to CSS ems
Twiptwip240 twip0.00416666666667 remCSS rems to Twips
CSS millimetermm CSS4.23333333333 mm CSS0.236220472441 remCSS rems to CSS millimeters
CSS inchin CSS0.166666666667 in CSS6 remCSS rems to CSS inches