PX to REM Converter Online — CSS Units
Convert px to rem and rem to px online for free. Configurable root font size. Instant conversion, no signup required.
Quick Reference (base: 16px)
CSS Snippet
font-size: 1rem; /* 16px */Convert between px and rem units for CSS. Based on the root font size (default 16px), with support for em and other relative units.
How to use PX to REM Converter Online — CSS Units
- Set the root font size (default 16px).
- Enter a px value to convert to rem, or vice versa.
- Read the converted value.
Features
- Converts px to rem and rem to px.
- Configurable root font size.
- Also supports em conversions.
- Common values reference table.
FAQ
What is rem and why use it?
rem (root em) is relative to the root element's font size (usually 16px). Using rem for sizing makes your design scale with the user's font size preferences, improving accessibility. 1rem = 16px by default.
How do I change the root font size?
Set font-size on the html element: html { font-size: 18px; }. All rem values will then be relative to 18px. A common responsive technique is to use different root sizes for different breakpoints.
Should I use rem or em?
rem is relative to the root (consistent across the page). em is relative to the parent element's font size (compounds when nested). Use rem for layout spacing and font sizes; use em for component-internal spacing that should scale with the component.