px

PX to REM Converter

Convert px to rem and back based on the root font-size. Handy for responsive, accessible CSS.

Live·100% in your browser — no upload
px = 1 rem

= 1.5 rem

= 24 px

What is PX to REM Converter

The PX ↔ REM converter turns pixels into rem and back, based on the root font-size you set. It is handy for writing scalable, accessible CSS, where rem sizes adapt to the user's preferences.

The calculation is instant and happens in the browser.

How it works

  1. Set the base font-size (usually 16px).
  2. Type a value in px to see the rem, or in rem to see the px.
  3. Both conversions update in real time.
  4. Use the values in your CSS.

Frequently Asked Questions

Why use rem instead of px?
Rem sizes scale with the root font-size: if the user increases the text size for readability, the layout adapts. It is a good accessibility practice.
What is the typical base font-size?
16px is the default in most browsers, so 1rem = 16px unless set otherwise.
Does it apply to em too?
em is similar but relative to the parent's font-size, not the root. This tool converts relative to the root (rem).

Related tools