Pixel to REM Converter

Convert between pixels (px) and rem units for CSS. Set a custom base font size and get instant conversions with a handy reference table.

Default browser font size is 16px. Change this if your project uses a different root font size.

0
Pixels (px)
0
REM
0
EM
0
Points (pt)
font-size: 0rem; /* 0px */

Reference Table

Pixels (px) REM EM Points (pt)

Frequently Asked Questions

How do I convert px to rem in CSS?
Divide the pixel value by the root font size (usually 16px). For example, 24px / 16 = 1.5rem. This tool does the math instantly with any base font size.
What is the default base font size for rem?
Most browsers use a default root font size of 16px. So 1rem = 16px, 0.5rem = 8px, and 2rem = 32px unless you override it in your CSS.
What is the difference between rem and em in CSS?
Rem is relative to the root (html) font size, making it consistent across the page. Em is relative to the parent element font size, so it compounds when nested. Rem is generally preferred for predictable sizing.
Why should I use rem instead of px in CSS?
Rem units respect the user browser font size preference, making your site more accessible. They also make responsive design easier since you can scale the entire layout by changing the root font size.
Is this px to rem converter free to use?
Yes. This converter runs entirely in your browser with no signup, no ads gating, and no data sent to any server.