PX to REM Converter
Convert between px, rem, and em for CSS.
Convert CSS sizes between pixels, rem, and em instantly. Set your root font size (16px by default), then convert px to rem and em, or rem back to px — handy for building responsive, accessible layouts that scale with the user's font settings. It all runs in your browser.
Browsers default to 16px. 1rem = this value.
Runs entirely in your browser — nothing is uploaded.
How to use the px to rem converter
- 1Set your root font size (usually 16px).
- 2Enter a value in pixels or rem.
- 3Read the converted rem, em, and px values.
Frequently asked questions
What is the difference between rem and em?
rem is relative to the root (html) font size, so it's predictable across your whole page. em is relative to the parent element's font size, so it can compound when nested. For consistent spacing, rem is usually preferred.
Why convert px to rem?
Using rem lets your layout scale with the user's browser font-size setting, which is better for accessibility and responsive design than fixed pixels.
What root font size should I use?
16px is the browser default and the safest choice. Change it here only if you've set a different font-size on your html element.
