How to convert px to rem
A rem is the root (html) font size, which browsers set to 16 px unless you change it, so 24 px = 1.5 rem and 1.5 rem = 24 px. An em is the font size of the element's parent, so it equals rem only when the parent is the root size. A CSS inch is always 96 px, a point is 1/72 inch: 12 pt = 16 px.
The formula
Common conversions
Pixels to rem (root font size)
| Pixels | rem (root font size) |
|---|---|
| 8 px | 0.5 rem |
| 12 px | 0.75 rem |
| 14 px | 0.875 rem |
| 16 px | 1 rem |
| 18 px | 1.125 rem |
| 20 px | 1.25 rem |
| 24 px | 1.5 rem |
| 32 px | 2 rem |
| 48 px | 3 rem |
| 64 px | 4 rem |
rem (root font size) to pixels
| rem (root font size) | Pixels |
|---|---|
| 0.5 rem | 8 px |
| 0.75 rem | 12 px |
| 1 rem | 16 px |
| 1.25 rem | 20 px |
| 1.5 rem | 24 px |
| 2 rem | 32 px |
| 3 rem | 48 px |
Points to pixels
| Points | Pixels |
|---|---|
| 8 pt | 10.666667 px |
| 10 pt | 13.333333 px |
| 12 pt | 16 px |
| 14 pt | 18.666667 px |
| 18 pt | 24 px |
| 24 pt | 32 px |
Sources: factors are the exact international definitions — BIPM SI Brochure, NIST Special Publication 811 and, for binary data units, IEC 80000-13.
Use the px to rem converter
Type a value, pick the unit you have and the unit you want, and the answer appears with every other unit in the same family listed below it. Use the swap button to flip the two units. Under Go advanced you can set how many digits the result shows, your parent font size for em and %, and your viewport size for vw and vh.
Other converters
- Length Converter
- Weight Converter
- Volume Converter
- Temperature Converter
- Area Converter
- Speed Converter
- Data Storage Converter
- Cooking Measurement Converter
Also see the Recipe Converter, which scales and converts a whole recipe at once.
Common questions
How do I convert px to rem?
Divide the pixels by the root font size, 16 px by default. 24 px = 1.5 rem, 14 px = 0.875 rem and 10 px = 0.625 rem. If your root size is 10 px, enter 10 in the root font size box above and 24 px becomes 2.4 rem.
How do I convert rem to px?
Multiply rem by the root font size. 1 rem = 16 px, 1.5 rem = 24 px and 2 rem = 32 px.
What is the difference between em and rem?
Rem is relative to the root font size and em to the parent element's font size. 24 px = 1.2 em when the parent is 20 px, but 24 px = 1.5 rem whatever the parent is. Set the parent size under Go advanced to convert em.
How many pixels are in a point, pica and inch?
In CSS: 1 pt = 1.3333333 px, 1 pc = 16 px and 1 in = 96 px. So a 12 pt font is 16 px.
How do I convert px to vw?
Divide the pixels by the viewport width and multiply by 100. On a 1,920 px wide viewport 960 px = 50 vw. Enter your viewport width under Go advanced.