Skip to main content

Scale Digital Media

Web Development · Converter

PX to REM Converter

Rem units scale with the visitor's browser font setting, which makes sites easier to read for people who increase their text size. Convert single values, a list of values, or paste CSS and have every px value converted to rem at your chosen base size.

Free, no sign-up. Runs in your browser: nothing you enter is stored or sent to us.

Convert units

px

The root (html) font size. Browsers default to 16px.

px

One value per line, or paste CSS: every number followed by px (or rem) is converted. 0 stays 0.

The formulas

rem = px ÷ root font size   |   px = rem × root font size

em = px ÷ parent element’s font size

With the default 16px root, 24px is 1.5rem and 14px is 0.875rem. Some projects set the root to 62.5% (10px) so 1.6rem = 16px; if yours does, set the base to 10.

pxrem (16px base)Typical use
120.75Small print (use sparingly)
140.875Captions, labels
161Body text minimum on mobile
181.125Comfortable body text
241.5Subheadings
322Section headings
483Page headings

rem or em?

  • rem is relative to the root, so it is predictable everywhere. Use it for font sizes and most spacing.
  • em is relative to the current element’s font size, so it compounds when nested. Useful for padding that should scale with a button’s text.
  • px is still fine for borders and fine details that should not scale.

Rem-based text respects visitors’ browser text-size settings, which matters for accessibility. Pair it with sufficient colour contrast; check that with the Colour Contrast Checker.

Next step

Planning a rebuild or fixing a site that underperforms?

Share what you are building or fixing. We will tell you what we would change first and why.