Free PX to REM Converter

Free tool · nothing is uploaded

Free px to rem converter

Type pixels or rem, and the root font size. The other size updates. With a root of 16, 16px is 1rem. The numbers stay in your browser.

16 pixels with a root of 16, shown as 1 rem.
The picture uses 16px and a root of 16. The form below uses the numbers you type.

px

rem

The usual browser root is 16px. This page does not read a stylesheet.

The numbers stay in this browser.

How the conversion works

  1. Pixels to rem is the pixel number divided by the root font size. With a root of 16, 16px is 1rem and 32px is 2rem.
  2. Rem to pixels is the rem number times the root font size. 1.5rem with a root of 16 is 24px.
  3. 18px with a root of 16 is 1.125rem.
  4. The usual browser root is 16px. If a page sets a different root font size, type that size here. This page does not read a stylesheet.
  5. The root can be greater than 0 and up to 512. A result that is not a short decimal is shown to 4 decimal places. A comma is a thousands separator, so 1,600 is 1600.

A negative pixel or rem value is kept, because CSS can use one. The root font size has to be greater than 0.

Questions about this converter

How do you convert px to rem?

Divide the pixels by the root font size. With a root of 16, 16px is 1rem and 32px is 2rem.

How do you convert rem to px?

Multiply the rem by the root font size. 1.5rem with a root of 16 is 24px.

What root size should I use?

The usual browser root is 16px. If a page sets a different root font size, type that size here. This page does not read a stylesheet.

Does this tool upload the numbers?

No. The numbers stay in the browser. Blogoose does not receive them.