PX to Rem Converter
Convert pixel values to rem units, live as you type, based on the standard 16px root font size.
Assumes the default 16px root font size. Type in either field — the other updates live.
Need the opposite? Rem to PX Converter
What is PX to Rem Converter?
Convert a pixel value to the equivalent rem unit, assuming the standard 16px browser default root font size. It's the most common conversion needed when moving a CSS design from fixed px values to scalable rem units.
PX to Rem Converter Table
| Pixels (px) | Rem |
|---|---|
| 8px | 0.5rem |
| 12px | 0.75rem |
| 16px | 1rem |
| 20px | 1.25rem |
| 24px | 1.5rem |
| 32px | 2rem |
| 40px | 2.5rem |
| 48px | 3rem |
| 64px | 4rem |
How to Use the PX to Rem Converter
- 1
Type a Pixel Value: Enter the px value from a design spec.
- 2
Read the Rem Result Instantly: The rem equivalent appears automatically, based on a 16px root.
PX to Rem Formula
rem = pixels ÷ 16 (assuming the default 16px root font size; divide by your project's actual root size instead if it overrides the default)
Common PX to Rem Conversions
8px = 0.5rem 12px = 0.75rem 16px = 1rem (the base size) 20px = 1.25rem 24px = 1.5rem 32px = 2rem 48px = 3rem
How to Convert PX to Rem
Divide the pixel value by 16 (or by your project's actual root font-size in pixels, if it's not the 16px default). For example, 24px ÷ 16 = 1.5rem.
PX to Rem Examples
A design spec calling for a 14px font size becomes 14 ÷ 16 = 0.875rem in CSS. A 40px spacing value becomes 40 ÷ 16 = 2.5rem. If a project sets html { font-size: 62.5%; } (a common trick for 10px-based math), the root is 10px, not 16px, so divide by 10 instead.
Frequently Asked Questions
Common questions about PX to Rem Converter.