Convert rem to px
At the browser default root font size of 16 px, 1rem = 16px. Change the base below if your project uses a different root size.
Formula
px = rem × 16
rem = px × 0.0625
Because rem is relative, this ratio holds only at a 16 px base. If your project sets html { font-size: 62.5% } — a common trick that makes 1rem equal 10 px — set the base above to 10 instead.
REM to PX conversion table
| rem | px |
|---|---|
| 8rem | 128px |
| 10rem | 160px |
| 12rem | 192px |
| 14rem | 224px |
| 16rem | 256px |
| 18rem | 288px |
| 20rem | 320px |
| 24rem | 384px |
| 28rem | 448px |
| 32rem | 512px |
| 36rem | 576px |
| 40rem | 640px |
| 48rem | 768px |
| 56rem | 896px |
| 64rem | 1024px |
| 72rem | 1152px |
| 80rem | 1280px |
| 96rem | 1536px |
| 128rem | 2048px |
About rem
One rem equals the font size of the root <html> element — 16 px unless you or the user changes it. Because it ignores nesting, rem is the unit of choice for a consistent type and spacing scale.
About px
The CSS pixel is the reference unit of the web. It is not a physical device pixel — it is an angular measure standardised at 1/96th of an inch, which the browser scales for device pixel ratio and zoom.
Which unit should you use?
| Property | Recommended unit | Why |
|---|---|---|
| Font size | rem | Scales with the user's browser font-size preference, which px ignores — an accessibility requirement. |
| Padding and margin | rem or em | rem for a consistent global rhythm; em when the spacing should track the component's own text size. |
| Borders and hairlines | px | You almost always want exactly one crisp pixel, not a value that scales. |
| Media query breakpoints | em | Historically the most reliable across browsers when the user zooms. |
| Print stylesheets | pt, cm, mm | These map to real physical measurements on paper. |
Frequently asked questions
What is 16rem in px?
16rem equals 256px at a 16 px root font size.
How do I convert rem to px?
Multiply the rem value by 16. Going the other way, multiply the px value by 0.0625.
Does the root font size change the result?
Yes. One of these units is relative to the root font size, so changing it changes the conversion. Use the base control above to match your project.
Why does CSS use 96 pixels per inch?
It is a historical convention from early desktop displays that became the fixed CSS reference. It has nothing to do with your monitor's real pixel density — the browser scales CSS pixels to physical ones for you.