Pixel ↔ REM/EM Converter
Convert CSS pixel values to rem and em units, and vice versa. Includes a reference conversion table.
px
px
e.g. 24
Common Conversions (base 16px)
| PX | REM |
|---|---|
| 8px | 0.5rem |
| 12px | 0.75rem |
| 14px | 0.875rem |
| 16px | 1rem |
| 18px | 1.125rem |
| 20px | 1.25rem |
| 24px | 1.5rem |
| 32px | 2rem |
| 48px | 3rem |
| 64px | 4rem |
How to Use
Convert CSS pixel values to rem and em units, and vice versa. Includes a reference conversion table.
- 1In the 'Settings' section at the top, verify or adjust the base font size (default 16px) to match your project's root font size set on the html element.
- 2To convert px to rem or em: click the 'PX → REM/EM' tab, type a pixel value in the input field, and both rem and em results appear instantly below.
- 3Each result card shows the conversion formula (e.g. 24px ÷ 16 = 1.5rem) — useful for understanding the math or pasting into code comments.
- 4To convert rem or em back to px: click the 'REM/EM → PX' tab, enter a rem or em value, and the pixel equivalent is shown.
- 5Use the 'Common Conversions' table at the bottom for quick reference — it lists 10 standard pixel values and their rem equivalents at base 16px.
Key Features
- Bidirectional conversion — px to rem/em and rem/em back to px
- Configurable base and parent font sizes — match your actual project settings
- Live formula display — shows the exact math for each conversion
- One-click copy for rem, em, and px results
- Reference conversion table — 10 standard pixel values at base 16px for quick lookup