PX to REM Converter
Convert pixels to rem/em and back for CSS. Free, no sign-up, works in your browser.
=
Convert a whole stylesheet
🔒 100% private — processing happens in your browser. Nothing is uploaded.
How to convert px to rem
- Set the root font size (16 px by default).
- Type a pixel value to get rem, or rem to get px.
- To convert a whole stylesheet, paste the CSS, set a minimum value to ignore, and convert.
Why use rem
rem units are relative to the root font size, so a site built with rem respects the user’s browser text size setting — an accessibility win. 1 rem = 16 px by default, so 24 px = 1.5 rem.
Converting a whole stylesheet at once saves time when refactoring; tiny values such as 1 px borders are usually better left in px.
Questions and answers
What is the difference between rem and em?
rem is relative to the root (html) font size; em is relative to the parent element.
What root size should I use?
16 px unless your CSS sets html { font-size } to something else.
Should borders be in rem?
Usually keep 1–2 px borders in px.
Is it free?
Yes, no sign-up.