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
| px | rem | |
|---|---|---|
| 8px | 0.5rem | |
| 12px | 0.75rem | |
| 14px | 0.875rem | |
| 16px | 1rem | |
| 18px | 1.125rem | |
| 20px | 1.25rem | |
| 24px | 1.5rem | |
| 32px | 2rem | |
| 40px | 2.5rem | |
| 48px | 3rem | |
| 64px | 4rem | |
| 96px | 6rem |
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.