PX to REM converter

Convert pixels to rem and rem to pixels for CSS.

  • Development
  • 100% free
  • No sign-up
  • Runs in your browser
PX to REM converter
One or more values; add rem to convert back to pixels.
px

What is the px to rem converter?

The PX to REM converter turns pixel values into rem units and back, based on the root font size of the page (16 px in every browser by default). Convert one value or a whole list, such as a padding shorthand, at once.

rem units scale with the user's browser font size setting, which makes text and spacing more accessible than fixed pixels.

How to use the px to rem converter

  1. 1Enter one or more values, such as 24, 24px or 1.5rem.
  2. 2Set the root font size if your site changes it.
  3. 3Copy the converted values.

Features

Both directions

px to rem and rem to px.

Several values

Convert shorthand values in one go.

Custom root size

Any base font size.

Reference table

Common pixel sizes in rem.

Frequently asked questions

How do I convert px to rem?

Divide the pixel value by the root font size: 24px ÷ 16 = 1.5rem.

What is the difference between rem and em?

rem is relative to the root (html) font size; em is relative to the font size of the current element.

Why use rem instead of px?

rem respects the font size the visitor chose in the browser, which helps accessibility.

What if my html font size is 62.5%?

Then the root size is 10px: set the root font size to 10.