Skip to content

PX to REM Converter

Convert between pixels and rem/em for any root font size.

Instant and private in your browser.

Direction

How do you convert PX to REM?

rem = px ÷ root font size, and px = rem × root font size; with the default 16px root, 1rem = 16px. For example, at a 16px root, 24px equals 1.5rem. Using rem keeps layouts proportional when users change their browser's default font size, making it more accessible than fixed pixels.

Understanding your result

Using rem keeps layouts proportional when users change their browser’s default font size — better for accessibility than fixed pixels.

Formula and method

rem = px ÷ root font size; px = rem × root font size. With the default 16px root, 1rem = 16px.

Worked example

At a 16px root, 24px equals 1.5rem.

How to use this tool

  1. Enter a value and choose the direction.
  2. Set the root font size (16px by default).
  3. Press Convert.

About the PX to REM Converter

The PX to REM Converter turns pixel values into rem (or em) units and back, based on your root font size, so your CSS scales with the user’s settings.

Explore all Developer Tools tools

Frequently asked questions

What’s the difference between rem and em?

rem is relative to the root font size; em is relative to the current element’s font size. For a 16px root they match at the top level.

Share this tool

Free to use — copy the link, share it anywhere, or add the tool to your own website.

Embed this tool on your site (free)

Copy this code and paste it into any web page — it stays free and always up to date: