Toolbox/PX to REM Converter — Pixels & REM
Runs locally
CSS & LAYOUT

PX to REM converter

Keep your spacing in proportion. Convert in both directions, set your root size, and handle a whole list at once.

Instant conversion

One value or a list separated by spaces, commas or new lines. Up to 1,000 values.

Try a PX value:
YOUR RESULT
1.5rem

24px ÷ 16 = 1.5rem

TYPE PREVIEW · FIRST VALUEAa — in proportion.Preview is limited to 8–72px for readability.
Calculated on your device

Everyday spacing, translated.

At a 16px root size
PixelsREMPixelsREM
4px0.25rem40px2.5rem
5px0.3125rem48px3rem
8px0.5rem64px4rem
10px0.625rem72px4.5rem
12px0.75rem80px5rem
14px0.875rem96px6rem
16px1rem100px6.25rem
20px1.25rem120px7.5rem
24px1.5rem144px9rem
32px2rem150px9.375rem
A LITTLE CONTEXT

Relative to your root.

The CSS rem unit is relative to the computed font size of the root element (usually ). A root font size of 16px makes 24px equal to 1.5rem. If the root is 20px, the same 24px equals 1.2rem.

rem = px ÷ root font size

References: MDN: CSS length units

Good to know

Is 1rem always 16px?

No. 1rem equals the computed root font size. 16px is a common browser default, but site styles and user preferences can change it.

What is the difference between rem and em?

For most properties, em uses the element’s computed font size. For font-size itself, em uses the inherited font size. Rem uses the root font size; root font-size has special initial-value rules.

Does this change my CSS file?

No. This version converts numeric values only. It does not rewrite stylesheets, media queries or design tokens.

How is rounding handled?

Results are rounded to your selected decimal places, with trailing zeros removed. This is a display conversion using standard JavaScript numbers.

PRACTICAL REFERENCE

Pixels to rem: worked examples

The root font size is part of every answer. The worked examples below explicitly use 16px unless another root is stated.

80px to rem

At a 16px root, 80 ÷ 16 = 5rem. At a 20px root, the same 80px equals 4rem. Set the root size above to match the page you are working on.

14px and 150px to rem

At a 16px root, 14px is 0.875rem and 150px is 9.375rem. These are conversions, not recommendations for accessible font sizes.

The table above updates with your root size and rounding preference. Conversion to rem does not by itself guarantee accessibility; font-size rules, zoom and user preferences still matter. Use the REM to PX tab for the reverse direction.

Find a tool

Unix timestampTime & datesPX ↔ REMCSS & layoutBase64 encode / decodeEncodingBase64 to imageImages & files