PX to REM

Root Font Size

PX / Decimals :
Root Font Size PX / Decimals :

REM to PX

Root Font Size

PX /
Root Font Size PX

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

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.