This PX to REM instant online converter converts pixels to REM using a default 16 pixels font-size. The formula used here is 1px = 0.0625rem and 1rem = 16px. The REM to PX conversion also works here.
The PX to REM converter is very helpful when you want to convert any pixel-based designs to accessible, scalable REM-based layouts.
Table of Contents:
PX to REM Conversion
How to Use PX to REM Converter
This utility is helpful in CSS development in responsive designs.
Enter a value in either field:
- Type
16in the PX field → REM field shows1 - Type
2in the REM field → PX field shows32
Real-time conversion happens instantly as you type.
Formula Used:
- PX to REM: px ÷ 16 = rem
- REM to PX: rem × 16 = px
Difference Between PX and REM Units
PX (Pixels)
- It’s an absolute unit – a fixed size that does not change
- 1px = 1 pixel on the screen
- Used in static measurements like inches or centimeters
REM (Root EM)
- It’s a relative unit – size depends on root font-size
- 1rem = root element’s font-size (usually 16px)
- Used in scalable measurement that adapts
CSS Example Using PX and REM
/* Use PX for tiny details */
border: 1px solid #ddd;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
/* Use REM for everything else */
font-size: 1.125rem; /* 18px */
padding: 1rem 1.5rem; /* 16px 24px */
margin-bottom: 2rem; /* 32px */
max-width: 50rem; /* 800px */
PX ↔ REM Quick Conversion Tables
| PX | REM | Use Case |
|---|---|---|
| 10px | 0.625rem | Small text, captions |
| 12px | 0.75rem | Small body text |
| 14px | 0.875rem | Small-medium text |
| 16px | 1rem | Base/Body text |
| 18px | 1.125rem | Large body text |
| 20px | 1.25rem | Small headings |
| 24px | 1.5rem | H4 headings |
| 28px | 1.75rem | H3 headings |
| 32px | 2rem | H2 headings |
| 36px | 2.25rem | H1 headings |
| 48px | 3rem | Large headings |
| 64px | 4rem | Hero text |
Spacing Values:
| PX | REM | Category |
|---|---|---|
| 2px | 0.125rem | Micro (borders) |
| 4px | 0.25rem | Micro (fine details) |
| 8px | 0.5rem | Small spacing |
| 12px | 0.75rem | Small spacing |
| 16px | 1rem | Base spacing |
| 20px | 1.25rem | Medium spacing |
| 24px | 1.5rem | Medium spacing |
| 32px | 2rem | Large spacing |
| 40px | 2.5rem | Large spacing |
| 48px | 3rem | XL spacing |
| 64px | 4rem | XXL spacing |
| 80px | 5rem | Section gaps |
Layout Breakpoints:
| PX | REM | Device |
|---|---|---|
| 320px | 20rem | Mobile (small) |
| 480px | 30rem | Mobile (large) |
| 768px | 48rem | Tablet |
| 1024px | 64rem | Desktop (small) |
| 1200px | 75rem | Desktop |
| 1440px | 90rem | Desktop (large) |
MOST COMMON Conversions:
PX to REM:
8px = 0.5rem | 16px = 1rem | 32px = 2rem
12px = 0.75rem | 20px = 1.25rem | 48px = 3rem
14px = 0.875rem | 24px = 1.5rem | 64px = 4rem
REM to PX:
0.25rem = 4px | 1rem = 16px | 3rem = 48px
0.5rem = 8px | 1.5rem = 24px | 4rem = 64px
0.75rem = 12px | 2rem = 32px | 5rem = 80px




