CSS unit converter
Convert CSS lengths between px, rem, em, pt and % against any root font size.
Related tools
CSS unit converter
Paste CSS values one per line — 16px, 1.5rem, 12pt, 150% — and this converter translates them instantly. A bare number is read in the unit set by the From select, while a unit written in the line always wins, so you can mix pixels and rems in one list. Pick a target under To, or choose All units to see the whole chain at a glance: 16px = 1rem = 12pt = 100%. Lines that are not plain values pass through unchanged, so a stray comment never breaks the run.
The math hangs off one number: the base size, the root font size in pixels. Browsers default to 16px, which is why 1rem usually equals 16px and 100% equals the base. Set the base to 10 for the classic 62.5% trick where 1.5rem is 15px, or match a design system with a different root. Points are fixed by CSS itself — 1px is 1/96 of an inch and 1pt is 1/72, so 16px is exactly 12pt regardless of the base. The decimals option caps precision at up to six places, with trailing zeros trimmed.
Rem is the accessibility-friendly unit: it scales with the reader's browser font-size preference, so text set in rem grows when someone raises their default size, while px stays fixed. Em uses the same math here, but in a real stylesheet it is relative to the element's own font size, so nested em values compound where rem does not — this converter assumes the flat, root-relative case.
Everything runs locally in your browser — nothing is uploaded and there is nothing to wait for. Copy the converted list or download it as a .txt file.