Interfaces and CSSRuns in your browser

px ↔ rem Converter

Calculate a relative rem value from pixels or convert rem back to pixels for a selected root font size.

  • Two-way conversion
  • Custom root size
  • Instant calculation
Online tool

Try the tool

Add your data, choose the settings, and get the result.

px → rem

rem → px

16 px = 1 rem

Processing in your browser

Text and selected files are processed in the current browser and are not sent to a server to produce the result.

Reviewed: 2026-07-17
01

How to use it

  1. 1

    Enter the root font size.

  2. 2

    Enter a px or rem value.

  3. 3

    Read the equivalent value in the other unit.

02

What the tool can do

  • px divided by root size equals rem.
  • rem multiplied by root size equals px.
  • Decimal numeric values.
03

Common use cases

  • Translating design dimensions into relative CSS units.
  • Checking a value with a non-default root font size.
  • Converting rem back to pixels for comparison with a design.
04

How it works inside

1rem equals the computed font size of the root html element.

16 px is common but is not mandatory for every project.

05

Questions and answers

How do I convert pixels to rem correctly?

Enter the pixel size and your site's root font size. For example, with a 16 px base, 24 px equals 1.5 rem. A different base produces a different result.

Why does the calculated size look different on my site?

Check the page's root font size and browser settings. rem depends on the root font size, while em depends on the relevant font-size context. The calculator uses the base you enter; it does not read your site's styles.