PX to REM Converter

Type a value in pixels or rem – the other updates instantly. Change the root font size if your site does not use the default 16 px.

pxrem%
8
10
12
14
16
18
20
24
28
32
36
40
48
56
64

The formula

rem = px ÷ root font size and px = rem × root font size. With the browser default of 16 px, 24 px is 1.5 rem and 0.75 rem is 12 px.

Why use rem?

  • rem values scale with the user’s font-size setting, which improves accessibility.
  • Changing the root size on html resizes a whole design consistently.
  • Media queries in em/rem react to zoom and font settings more reliably than pixels.

rem vs. em

rem is relative to the root (html) font size and is the same everywhere on the page. em is relative to the font size of the current element, so nested em values multiply. Use rem for spacing and type scales, em for things that should grow with their own text.

Frequently asked questions

What is 1rem in pixels?

With default browser settings 1rem = 16px. If your CSS sets html { font-size: 62.5% }, then 1rem = 10px.

How many rem is 14px?

0.875rem at a 16px base.

Should I use rem for borders?

Thin borders are usually better in px (e.g. 1px) so they stay crisp at every size.

Does this work for em too?

Yes, if you set the base to the font size of the parent element.

Related tools