Convert PX to REM

Common sizes at a 16px root

pxrempxrem
100.625241.5
120.75281.75
140.875322
161402.5
181.125483
201.25644

Turn the pixel sizes from a design file into rem for your CSS, or check what a rem value comes to in pixels. Change the root font size if your project does not use 16px.

  • Free
  • Runs in your browser
  • Both directions
  • No sign-up
How it works

How It Works

Convert sizes in three steps.

01

Enter a size

Type in the px field or the rem field.

02

Check the root size

16px is the browser default. Change it if your CSS sets a different html font size.

03

Copy with the unit

Copy rem or Copy px adds the unit, ready to paste into CSS.

About

Why use rem instead of px?

A rem is a multiple of the root (html) font size. At the browser default of 16px, 1rem is 16px and 1.5rem is 24px. Because rem follows the root size, text and spacing set in rem grow when a reader increases the default font size in their browser settings, while px values stay fixed. That is why accessibility guidance and frameworks such as Tailwind CSS use rem for font sizes and spacing.

em works like rem but is relative to the parent element's font size, so nested elements compound. rem is easier to predict, which is why it is the usual choice for sizes across a site.

rem = px ÷ root

24px at a 16px root is 24 ÷ 16 = 1.5rem.

Custom root size

Some projects set html { font-size: 62.5% } so that 1rem = 10px. Enter 10 as the root to match.

Reference table

Twelve common sizes from 10px to 64px, recalculated for your root size.

Clean decimals

Results are rounded to four decimal places without trailing zeros.

Features

Why Use This Converter

Quick sums for CSS.

Two-way

Type in either field and the other updates.

Any root size

Works for 16px, 10px (62.5%) or any other base.

Cheat sheet

Common sizes are listed for quick lookup.

Private

Runs in your browser.

✓ No Registration✓ Free✓ Browser-based✓ Text Stays Local
FAQ

Frequently Asked Questions

Questions people ask about the PX to REM Converter.

16px in every major browser by default, unless the site changes the root font size or the reader changes their browser's default font size.