Skip to main content
UnitCraftCSS tools for developers

UnitCraft utility

PX to REM converter

REM is relative to the root element (`html`). With root font-size R px, rem = px ÷ R. UnitCraft runs entirely in your browser—no uploads.

Calculator

Typically html { font-size }

Result

24 px ↔ 1.5 rem

css
font-size: 1.5rem;

Why PX → REM matters

Design systems encode spacing and type in REM so layouts respect user zoom and root preferences.

Product teams often baseline R = 16px but verify your actual `:root { font-size }` in production.

Copy-paste examples

Example

css
/* 24px @ 16px root */
font-size: 1.5rem;

Frequently asked questions

Is 1rem always 16px?
No. It equals the computed root font-size. Themes, settings, or `html { font-size: … }` can change it.

Related tools

Explore more