Skip to content

PX to REM Converter

Convert pixels to rem and back for any root font size, with a table of common sizes.

16 in every browser by default

Common sizes at 16 px
pxrem
100.625
120.75
130.8125
140.875
150.9375
161
181.125
201.25
241.5
281.75
322
362.25
402.5
483
563.5
644
724.5
966

Runs in your browser — nothing you enter is sent to a server.

How the PX to REM Converter works

rem is a CSS unit relative to the root font size — 16 px in every browser unless the visitor changes it. Type pixels to get rem, or rem to get pixels. If your site sets a different root size, change it and everything recalculates, including the table of common sizes.

Formula

rem = px ÷ root font size

And px = rem × root font size.

Examples

With the default 16 px root

24 px = 1.5rem, 14 px = 0.875rem and 1.25rem = 20 px.

With a 10 px root

20 px = 2rem — easier sums, if your CSS sets that root.

Frequently asked questions

Why use rem instead of px?

rem sizes follow the visitor's browser font-size setting, which people with low vision rely on. px sizes ignore it.

What is the difference between rem and em?

rem is relative to the root (html) element; em to the parent's font size, so em values compound when elements are nested.

Should I set html font-size to 62.5%?

It makes 1rem = 10 px for easier sums and still respects the user setting, but every component then needs its own font size. Many teams simply use 16 px and a converter.

CSS Clamp Calculator

Make font sizes and spacing scale smoothly between two screen widths with CSS clamp().

Design Tools

Type Scale Generator

Create a harmonious set of font sizes from a base size and a ratio, with CSS variables.

Design Tools

Unit Converter

Convert length, weight, temperature, area, volume, speed, time, data storage, pressure and energy units instantly.

Converters