Skip to main content
CalcChef

PX to REM Converter

Convert px to rem and rem to px at any base font size (16px by default), with em, pt and percent conversion and a px to rem chart for common sizes. How it works

Use the PX to REM Converter

Unit

= 1.0000 rem · 1.0000 em (parent 16px)

= 16.0000 px · 1.0000 em

1 px = 0.75 pt (96 px per inch, 72 pt per inch)

of the 16px parent font size

Common font sizes
Converted
1.0000 rem
Copy Format
Live background
The quick brown fox jumps over the lazy dog. Background text at 16px (1.0000rem).

About the PX to REM Converter

rem = px ÷ root font size. Browsers use a 16px root by default, so 16px = 1rem, 24px = 1.5rem and 12px = 0.75rem. Typing in the rem box works the other way, rem × root = px, and the EM mode divides by a parent size you set instead. Points are px × 0.75, because CSS sets 1in to 96px and 72pt, and percent is px ÷ parent × 100: 24px is 18pt and 150% of a 16px parent.

px to rem chart

Pixelsrem at a 16px baserem at a 10px base
1px0.0625rem0.1rem
2px0.125rem0.2rem
4px0.25rem0.4rem
8px0.5rem0.8rem
10px0.625rem1rem
12px0.75rem1.2rem
14px0.875rem1.4rem
16px1rem1.6rem
18px1.125rem1.8rem
20px1.25rem2rem
24px1.5rem2.4rem
32px2rem3.2rem
40px2.5rem4rem
48px3rem4.8rem
64px4rem6.4rem

The 10px column applies when the stylesheet sets html { font-size: 62.5%; }, which makes 1rem equal 10px at the browser default. The converter rounds to four decimal places.

rem to px at a 16px base

remPixels
0.25rem4px
0.5rem8px
0.75rem12px
0.875rem14px
1rem16px
1.25rem20px
1.5rem24px
2rem32px
3rem48px
4rem64px

Frequently asked questions

How do I convert px to rem?
Divide the pixel value by the root font size. With the default 16px root, 24px ÷ 16 = 1.5rem. To go back, multiply: 1.5rem × 16 = 24px.
How many pixels is 1rem?
16px by default in every major browser. It changes if the page sets a font size on the html element, or if the reader picks a different default font size in the browser settings.
Why use rem instead of px?
A font size in px ignores the default font size a reader has set in the browser. A size in rem follows it: someone who raises the default from 16px to 20px gets text 25% larger from rem values and no change from px values.
What if my base font size is not 16px?
Divide by your own base. On a 10px root, 24px is 2.4rem; on an 18px root it is 1.3333rem. Set the base field to match your project, and the tool keeps it in this browser for your next visit; Clear Saved Values sets it back to 16.
What is the difference between rem and em?
rem is always relative to the root font size. em is relative to the font size of the element itself, or of its parent when used on font-size, so nested em values multiply: 1.2em inside 1.2em is 1.44 times the outer size. EM mode here converts against a parent font size that you enter.
Do rem units in media queries follow the root font size?
No. Inside a media query, rem and em are based on the browser’s default font size, normally 16px, even when the stylesheet changes the html font size. A 48rem breakpoint is 768px.

Related Tools

View all tools