PX to REM Converter

Convert between px and rem instantly, based on the root font size.

px

rem

Common values

Click a value to copy it in rem.

Batch CSS converter

Paste CSS and every value converts instantly. @media conditions are left untouched.

Calculate in SCSS

A function with your root font size baked in.

PX to REM conversion table (16px base)

Values for the browser default root font size of 16px. Formula: rem = px ÷ 16

pxrem
1px0.0625rem
2px0.125rem
4px0.25rem
6px0.375rem
8px0.5rem
10px0.625rem
11px0.6875rem
12px0.75rem
13px0.8125rem
14px0.875rem
15px0.9375rem
pxrem
16px1rem
17px1.0625rem
18px1.125rem
19px1.1875rem
20px1.25rem
21px1.3125rem
22px1.375rem
24px1.5rem
26px1.625rem
28px1.75rem
30px1.875rem
pxrem
32px2rem
36px2.25rem
40px2.5rem
44px2.75rem
48px3rem
56px3.5rem
60px3.75rem
64px4rem
72px4.5rem
80px5rem
96px6rem

REM to PX conversion table (16px base)

rempx
0.125rem2px
0.25rem4px
0.375rem6px
0.5rem8px
0.625rem10px
0.75rem12px
0.875rem14px
rempx
1rem16px
1.125rem18px
1.25rem20px
1.5rem24px
1.75rem28px
2rem32px
2.25rem36px
rempx
2.5rem40px
3rem48px
3.5rem56px
4rem64px
5rem80px
6rem96px

Projects that set html { font-size: 62.5% } have 1rem = 10px, so just divide by 10 (16px = 1.6rem). Set the root font size above to 10 to convert on that basis.

PX to REM Conversion Guide: Where Accessibility Starts

The PX to REM converter is the tool most often recommended to developers who want to build accessible websites. While pixels describe a fixed physical size on screen, REM is a "smart" unit that responds to the user's environment and browser settings.

1. What is the REM (Root EM) unit?

REM is a relative unit based on the font size set on the document's root <html> element. The browser default is usually 16px, which makes 1rem = 16px. If a user with low vision raises their browser's default font size, everything sized in rem scales proportionally — and that is the single biggest reason to prefer REM over PX.

2. REM vs EM: the decisive difference

  • REM (Root EM): always references the html element's font size. It stays consistent wherever you use it, which keeps the math simple.
  • EM: references the parent element's font size. In nested structures, sizes can compound unexpectedly, so it needs more care.

3. Why should you use REM?

The main reason is accessibility. With fixed px sizes, users who adjust their preferred font size see no change, which can make your site hard to read. REM respects the user's browser preference while preserving your design's proportions. It is also the foundation of modern fluid typography techniques.

4. How to use this tool

Enter your base font size in the Root Font Size field (default 16px), then type any px value from your design to get the rem equivalent instantly. Many teams use the html { font-size: 62.5%; } trick to make 1rem equal 10px — set the root to 10 in this tool and the conversions will match that setup exactly. The batch converter converts every px value in a pasted CSS file at once.

Frequently Asked Questions

Q. How many pixels is 1rem?

1rem equals the font size of the html root element. The browser default is 16px, so unless you change it, 1rem = 16px.

Q. What is the formula to convert px to rem?

rem = px value ÷ root font size. With a 16px root, 24px equals 24 ÷ 16 = 1.5rem.

Q. What is the html font-size: 62.5% trick?

Setting font-size: 62.5% on the html element makes 1rem equal 10px, so 1.6rem = 16px and the math becomes base-10. Set the root font size to 10 in this tool to match that setup.

Q. Why use rem instead of px?

When users increase their browser's default font size, everything sized in rem scales with it. Sizes fixed in px ignore the user's font settings, which hurts accessibility.