DEVELOPER TOOLS

PX to REM converter●

Convert CSS pixels to rem and back, using your base font size.

Both fields update each other as you type. Nothing leaves this page.

Result

CSS value

-

px
-
rem
-
em
-
Percent
-
Common sizes
pxrem

Values are converted in this browser tab and are never sent anywhere.

Why use rem instead of px

One rem equals the root font size, 16px by default. Sizes in rem scale when a user changes the font size in their browser, which helps accessibility, while px values stay fixed. To convert, divide pixels by the base size: 24px at a 16px base is 1.5rem.

Color converter →

Common questions

How do I convert px to rem?

Divide the pixel value by the root font size. With the default 16px, 32px is 2rem.

What is the difference between rem and em?

Rem is relative to the root font size. Em is relative to the font size of the current element, so it can compound when nested.

Is 1rem always 16px?

Only by default. Users and sites can change the root font size, and rem follows it.

Is anything sent anywhere?

No. The conversion runs in your browser.