PX to REM Converter

Convert pixels to rem against the root font size your project uses. Enter the html font size and a px value, copy the rem result and check the reference table that recalculates with you.

Convert pixels to rem

Enter a valid number to see the conversion.

The root font size sets the px value of 1rem. The default browser value is usually 16px.

Quick conversion table

PixelsRem
8px0.5rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
32px2rem
48px3rem
64px4rem

What is rem?

rem is a CSS length unit that resolves against the root element's font size rather than the parent's. One rem equals the font size of html, which browsers set to 16px unless your stylesheet overrides it. That is why rem is the usual choice for type scales and spacing that should respect the user's own font-size setting.

Because the value depends on the root size, the same rem means different pixels on different sites. A root of 16px gives 1rem = 16px, while the 62.5% trick gives 1rem = 10px and turns the maths into moving a decimal point. This converter keeps the root size in the open so you always convert against the convention the project actually uses.

How to convert px to rem

  1. Set the root font size, or press 16px for the browser default and 10px for the common 62.5% setup.
  2. Type the pixel value you want to convert, for example 24 from a design file.
  3. Press Convert to rem. The result panel shows the rem value, the division behind it and a copy button.
  4. Read the reference table for nearby sizes; it recalculates against the same root size, so the whole page stays consistent.

px to rem examples

Default root

16px root, 16px
1rem

Design file value

16px root, 24px
1.5rem

62.5% root

10px root, 20px
2rem

UrsaKit vs other px to rem converters

DimensionUrsaKitpixelsconverter.comcodebeautify.orgnekocalc.com
PriceFreeFree with adsFree with adsFree with ads
Table follows the root sizeYesNoPartialPartial
One-click 16px / 10px presetsYesNoNoNo
Shows the division behind the resultYesNoNoNo
Uploads anythingNoNoNoNo
FAQ

Frequently asked questions

How many pixels is 1rem?

With the browser's default root size of 16px, 1rem equals 16px. If your CSS sets the html font size to 62.5%, 1rem is 10px, so always convert against the root size the project actually uses.

Why is the default root font size 16px?

Browsers ship with a 16px default font size for the html element, so 1rem resolves to 16px on a page that never changes it. The user can raise or lower that default in their browser settings, which is exactly why rem scales with their preference and px does not.

What does setting the html font size to 62.5% do?

62.5% of 16px is 10px, so 1rem becomes 10px. Developers use it because converting from px to rem then means dividing by ten, so 24px is 2.4rem.

Should I use px or rem in my CSS?

Use rem for font sizes and spacing that should scale with the user's settings, and keep px for borders, hairlines and anything that should stay physically fixed. Mixing both is normal; the trap is converting without knowing which unit a value belongs to.

How do I convert 24px to rem?

Divide the pixel value by the root size: 24 ÷ 16 = 1.5, so 24px is 1.5rem at the default root. At a 10px root it would be 2.4rem.

Is my data uploaded?

No. The conversion runs entirely in your browser and nothing is sent to a server.

All Tools