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
| px | rem | Copy |
|---|---|---|
| 10px | 0.625rem | |
| 12px | 0.75rem | |
| 14px | 0.875rem | |
| 16px | 1rem | |
| 18px | 1.125rem | |
| 20px | 1.25rem | |
| 24px | 1.5rem | |
| 28px | 1.75rem | |
| 32px | 2rem | |
| 36px | 2.25rem | |
| 40px | 2.5rem | |
| 48px | 3rem | |
| 56px | 3.5rem | |
| 64px | 4rem | |
| 72px | 4.5rem | |
| 96px | 6rem |
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?