Tools

Convert pixels to rem and rem to pixels for any root font size, plus a reference table of the sizes you reach for most. Rem units respect the user’s browser font-size preference, so they are the accessible choice for type, spacing and media queries.

Convert

rem = px ÷ 16. Browsers default the root font size to 16px unless the user or your CSS changes it.

Reference at 16px root

pxremCopy
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
96px6rem

Frequently asked questions

What is the formula for px to rem?
rem = px / root font size. With the default 16px root, 24px is 1.5rem and 10px is 0.625rem.
What is the difference between rem and em?
rem is relative to the root (html) font size, so it is the same everywhere on the page. em is relative to the font size of the current element, so nested em values compound.
Why use rem instead of px?
Users can change their browser’s default font size. Sizes in rem scale with that preference; sizes in px ignore it. Rem also keeps spacing proportional to type when the base size changes.

quick question

Was this tool helpful?