PX to REM Converter (CSS Unit Calculator)
Stop using your calculator to divide by 16. Pixedra’s PX to REM Converter makes modern CSS development faster. Simply enter your desired pixel value, and we calculate the exact REM (Root Em) value instantly. Whether you are building a responsive layout or ensuring Accessibility (a11y) compliance, moving from hard-coded Pixels to relative REM units is the industry standard for modern web design.
How to Calculate REM from Pixels
The formula to convert PX to REM is simple:
REM = Target Pixel Size / Base Root Size
By default, most web browsers (Chrome, Firefox, Edge) set the root font size (<html>) to 16px.
- Example: If you want a 24px header:
24 / 16 = 1.5rem. - Example: If you want a 32px padding:
32 / 16 = 2rem.
PX to REM Conversion Table (Base 16px)
| Pixels (px) | REM | Usage (Approx) |
|---|---|---|
| 12px | 0.75 rem | Small Text / Captions |
| 14px | 0.875 rem | Secondary Text |
| 16px | 1 rem | Standard Body Text |
| 18px | 1.125 rem | Large Body Text |
| 20px | 1.25 rem | Sub-headers (H5) |
| 24px | 1.5 rem | Medium Headers (H4) |
| 32px | 2 rem | Large Headers (H3) |
| 48px | 3 rem | Hero Titles (H1) |
| 64px | 4 rem | Display Text |
Note: Calculations assume the browser default root font size of 16px.
Frequently Asked Questions
Dev Tip
Working with icons? Use our SVG to React Converter to optimize your assets.
Need to handle API data? Generate types instantly with our JSON to TypeScript Converter.
