Skip to Content

PX to REM Converter: Pixels to REM and REM to PX

Convert px to rem and rem to px at any root font size, with full conversion tables for 16px and 10px roots.

  • Processed in your browser
  • 5 free uses a day, 50 with a free account
  • No watermark
  • Updated

Use the PX to REM Converter

What is a PX to REM Converter?

px to rem: divide the pixels by the root font size, which is 16px by default. So 12px = 0.75rem, 14px = 0.875rem, 16px = 1rem, 20px = 1.25rem, 24px = 1.5rem and 32px = 2rem. rem to px is the reverse: multiply by 16, so 1.25rem = 20px.

A rem is the root element’s font size. Browsers default that to 16px, so 1rem = 16px, and converting is one division or one multiplication: 24px ÷ 16 = 1.5rem, and 1.25rem × 16 = 20px.

Type into either box and the other one follows, so the converter works in both directions. Change the root font size if your stylesheet sets one, or pick the 10px preset for the 62.5% convention, where 1rem = 10px and 14px is simply 1.4rem.

Design files are specified in pixels and design systems are built in rem because rem follows the reader’s browser font-size setting: someone who raises their default to 20px gets proportionally larger type and spacing, while px values stay fixed.

PX to REM conversion table

Divide the pixel value by the root font size. At the browser default of 16px, 14px is 14 ÷ 16 = 0.875rem. The last column is for a 62.5% root, where 1rem = 10px.

Pixels to rem at a 16px and a 10px root
Pixelsrem (16px root)rem (10px root)
1px0.0625rem0.1rem
2px0.125rem0.2rem
3px0.1875rem0.3rem
4px0.25rem0.4rem
5px0.3125rem0.5rem
6px0.375rem0.6rem
8px0.5rem0.8rem
10px0.625rem1rem
12px0.75rem1.2rem
14px0.875rem1.4rem
15px0.9375rem1.5rem
16px1rem1.6rem
18px1.125rem1.8rem
20px1.25rem2rem
22px1.375rem2.2rem
24px1.5rem2.4rem
25px1.5625rem2.5rem
28px1.75rem2.8rem
30px1.875rem3rem
32px2rem3.2rem
36px2.25rem3.6rem
40px2.5rem4rem
48px3rem4.8rem
50px3.125rem5rem
52px3.25rem5.2rem
56px3.5rem5.6rem
60px3.75rem6rem
64px4rem6.4rem
72px4.5rem7.2rem
80px5rem8rem
96px6rem9.6rem
100px6.25rem10rem
120px7.5rem12rem
150px9.375rem15rem
200px12.5rem20rem
240px15rem24rem
300px18.75rem30rem
400px25rem40rem
500px31.25rem50rem
600px37.5rem60rem

REM to PX conversion table

Multiply the rem value by the root font size: 1.25rem × 16 = 20px, and 4rem × 16 = 64px.

rem to pixels at a 16px and a 10px root
remPixels (16px root)Pixels (10px root)
0.25rem4px2.5px
0.3rem4.8px3px
0.375rem6px3.75px
0.4rem6.4px4px
0.5rem8px5px
0.6rem9.6px6px
0.625rem10px6.25px
0.7rem11.2px7px
0.75rem12px7.5px
0.8rem12.8px8px
0.85rem13.6px8.5px
0.875rem14px8.75px
0.9rem14.4px9px
0.95rem15.2px9.5px
1rem16px10px
1.1rem17.6px11px
1.125rem18px11.25px
1.2rem19.2px12px
1.25rem20px12.5px
1.3rem20.8px13px
1.375rem22px13.75px
1.4rem22.4px14px
1.5rem24px15px
1.6rem25.6px16px
1.7rem27.2px17px
1.75rem28px17.5px
1.8rem28.8px18px
1.9rem30.4px19px
2rem32px20px
2.1rem33.6px21px
2.2rem35.2px22px
2.25rem36px22.5px
2.4rem38.4px24px
2.5rem40px25px
2.6rem41.6px26px
2.8rem44.8px28px
3rem48px30px
3.2rem51.2px32px
3.5rem56px35px
4rem64px40px
4.5rem72px45px
5rem80px50px
6rem96px60px
7rem112px70px
8rem128px80px
9rem144px90px
10rem160px100px

The 62.5% root, and why the base matters

html { font-size: 62.5% } sets the root to 62.5% of the reader’s default, which is 10px when the default is 16px. Every rem value then reads as pixels divided by ten: 14px is 1.4rem, 24px is 2.4rem.

Use a percentage, never html { font-size: 10px }. A pixel value on the root throws away the reader’s font-size setting, which is the whole reason to use rem. With 62.5%, a reader who sets 20px gets a 12.5px root and everything scales with it.

Two side effects to plan for: body text has to be set back to 1.6rem or it renders at 10px, and third-party components sized in rem on the assumption of a 16px root will come out at 62.5% of their intended size.

Common mistakes and edge cases

  • rem in media queries ignores your html font-size. @media (min-width: 48rem) is always 768px at the browser default, because media queries use the initial font size, not the one your stylesheet sets.
  • em compounds. A 1.2em element inside another 1.2em element is 1.44 times the outer size. rem does not compound, which is why it is the safer default.
  • Long decimals are fine. 15px is 0.9375rem; browsers lay out fractional values without trouble, so there is no need to round to two places.
  • Keep hairlines in px. A 1px border or divider usually should not grow with the font size.
  • Line height is best left unitless (line-height: 1.5), so it scales with whatever font size the element ends up with.

Further reading

Frequently asked questions

How do I convert px to rem?

Divide by the root font size. At the default 16px root, 14px ÷ 16 = 0.875rem and 24px ÷ 16 = 1.5rem.

How do I convert rem to px?

Multiply by the root font size. At 16px, 1.25rem × 16 = 20px and 4rem × 16 = 64px.

Why rem instead of px?

Readers who raise their browser font size get proportionally larger text and spacing with rem; px ignores their preference.

rem vs em?

rem is relative to the root element, so it means the same everywhere. em is relative to the parent’s font size and compounds down the tree. Default to rem.

What is the 62.5% trick?

html { font-size: 62.5% } makes 1rem = 10px at the default browser setting, so 14px is 1.4rem. Reset body text to 1.6rem, or it renders at 10px, and expect third-party components sized for a 16px rem to shrink.

Should borders be rem too?

Hairline borders usually stay px on purpose: you rarely want a 1px border to grow with the font size.

Design that has to survive real content?

BitsSolved builds interfaces that hold their shape at every screen size and clear the contrast bar an audit measures, not only the one a mockup implies.

Tell us what you need built.

Send a written enquiry and we reply by email with questions. A call is optional, and free. Then you get the scope in writing and a fixed quote for the first phase.

Based inTamil Nadu, India
ProcessWritten first, a call only if you want one