How it works
- Step 1
Enter a value.
Type a number in either field and the other one updates instantly.
- Step 2
Set the base or DPI.
Change the base font size or DPI if your project uses a different one.
- Step 3
Copy the result.
Copy the value or CSS, or pick a ready value from the table below.
Free PX to REM converter for CSS
rem is a CSS unit relative to the root font size of the page, the font size set on the html element. Browsers default to 16px, so 1rem equals 16px unless the site changes it. Designers use rem for type and spacing because rem values scale when a visitor raises their browser's default font size, which makes a site more accessible.
To convert, divide the pixel value by the base: 24px ÷ 16 = 1.5rem. Some teams set html { font-size: 62.5%; } so 1rem equals 10px and the math gets easier. If your project does that, set the base above to 10 and every value updates.
Common values at 16px
Click any value to copy it
Questions people ask
How do I convert px to rem?
Divide the pixel value by the root font size. With the default 16px base, 24px ÷ 16 = 1.5rem. Type any value above to convert it instantly, or change the base if your site uses a different root size.
What is 16px in rem?
16px is 1rem when the root font size is 16px, which is the default in all major browsers. 8px is 0.5rem, 12px is 0.75rem, 24px is 1.5rem and 32px is 2rem.
What's the difference between rem and em?
rem is relative to the root (html) font size, so it's the same everywhere on the page. em is relative to the font size of the parent element, so it changes when elements are nested. Most teams use rem for type and spacing and em for things that should scale with their own text.
Why use rem instead of px?
rem sizes scale when a visitor changes their browser's default font size, which helps accessibility. They also make a design easier to scale: change the root size and every rem value follows.
What is the 62.5% trick?
Setting html { font-size: 62.5%; } makes 1rem equal 10px at the default browser size, so 24px becomes 2.4rem. It makes mental math easy, but you then need to set body text back to 1.6rem.
Last updated: 25 Nov 2026 · Made by the LeadReef team