PX ↔ REM Converter

Convert between px and rem with a configurable base font size.

Runs entirely in your browser
px

Equivalent:

1 rem
rem

Equivalent:

16 px

Common values

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

FAQ

Why does the base font size matter?
rem is relative to the root element's font-size. Most sites keep the browser default of 16px, but some reset html { font-size: 62.5% } to get 1rem = 10px. Set the base here to match your setup.
Should I use px or rem?
rem lets users scale your whole design by changing their browser text size — an accessibility win. Use px for one-pixel borders where scaling would look wrong.

Related tools