Skip to content
ZeroServer.tools

PX to REM Converter

Convert px to rem and em (and back) for any root font size.

pxrem (base 16)
8px0.5rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
32px2rem
40px2.5rem
48px3rem
64px4rem

px, rem, and em explained

rem units are relative to the root font size (the <html> element), which defaults to 16px in every major browser. Sizing in rem instead of px lets your whole layout scale when a user changes their browser font size — a big accessibility win. The math is simple: rem = px ÷ base. For local scaling relative to a parent's font size, the same number works as an em.

More layout helpers: the aspect ratio calculator and the specificity calculator. Everything is computed in your browser.

Related Design & CSS tools