Skip to the content

REM to PX Converter

Type a value in rem and read it in pixels, at the usual root size of 16 px or at your own. A whole stylesheet can be converted in one go.

px

Browsers start at 16 px.

rem
px
em
1.5em
inside an element whose font size is 16 px
Points
18pt
1 px is 0.75 pt
Percent
150%
of the base font size

Convert a whole stylesheet

 

Share this tool:TwitterFacebookLinkedInWhatsAppEmail

From rem to pixels

Multiply the rem value by the font size of the root element, the <html> tag:

pixels = rem × root font size

Browsers give the root 16px unless something changes it, so 1.5rem is 1.5 × 16 = 24px and 0.875rem is 14px.

The same rem at three root sizes

remRoot of 10pxRoot of 16pxRoot of 20px
0.125rem1.25px2px2.5px
0.25rem2.5px4px5px
0.5rem5px8px10px
0.75rem7.5px12px15px
0.875rem8.75px14px17.5px
1rem10px16px20px
1.125rem11.25px18px22.5px
1.25rem12.5px20px25px
1.5rem15px24px30px
2rem20px32px40px
2.5rem25px40px50px
3rem30px48px60px
4rem40px64px80px

A rem has no fixed size in pixels, and that is the point of the unit. Two things move the root size:

  • The stylesheet. html { font-size: 62.5% } makes the root 10px, a common trick to keep the sums easy. html { font-size: 18px } makes it 18.
  • The reader. Browsers have a setting for the default font size. Someone who has raised it to 20px sees every rem a quarter larger, which is what they asked for.

A font size on <body> or on a container changes nothing: a rem always looks at the root. That is the difference with em.

Fill in the root size of your own site above the converter. With the 62.5% trick that is 10.

What converting a stylesheet costs

Turning the rem values of a stylesheet into px fixes every size at one root size, and the page then ignores the reader's font-size setting. That is fine for checking a design against a pixel grid, or for passing measurements to someone who works in pixels. It is rarely what should go live.

rem inside media queries

Inside a media query a rem is the browser's own default, 16px unless the reader changed it, whatever the stylesheet says about <html>. @media (min-width: 48rem) therefore switches at 768px, also on a site with a 10px root. The stylesheet converter leaves media queries alone unless you tick the box, and then converts them against 16.

The px to rem converter page goes the other way, and explains when rem is the better unit and what the 62.5% trick costs.

See all 8