PX ↔ REM / EM Converter
Convert between pixels, REM, and EM units. Set a custom root font size for accurate results.
| px | rem | em |
|---|
Convert between pixels (px) and REM units instantly for responsive CSS development. Set a custom base font size, convert single values or bulk lists, and reference the handy conversion table.
Features
Use Cases: When This Tool Helps
-
Build accessible typography
Use rem so text scales when users increase their browser font size.
Read the guide → -
Convert designs to code
Turn pixel values from Figma or Photoshop into rem for CSS.
-
Create a type scale
Convert a full set of heading and body sizes at once with bulk conversion.
-
Refactor old stylesheets
Replace hard-coded px values with rem in legacy CSS.
-
Set spacing systems
Convert margins and paddings to rem for consistent spacing tokens.
-
Work with a custom root size
Get correct values when your project uses a 10px or 18px base instead of 16px.
How to Use
- Enter your base font size (typically 16px).
- Type a px or rem value in the input field.
- The converted value appears instantly.
- Use the bulk converter to convert multiple values at once.
FAQ
Why use REM instead of pixels?▾
REM units scale with the user's browser font size preference, making layouts more accessible and responsive.
What is the default REM base?▾
Most browsers default to 16px, making 1rem = 16px. Always verify your project's html font-size.
Common Conversions
- 16px = 1rem
- 24px = 1.5rem
- 32px = 2rem
- 14px = 0.875rem
- 12px = 0.75rem