PX to REM converter

Type a value in any unit and set the base font size (16 px in most browsers). The converter gives the same length in px, rem, em, pt and percent. Use it to turn a design in pixels into scalable CSS that follows the reader's font size setting.

rem1.5 rem
Pixels
24 px
em (parent equal to base)
1.5 em
Points
18 pt
Percent of base
150 %

em is relative to the parent element's font size. Here the parent is assumed to equal the base size, so em matches rem.

Runs in your browser: nothing you enter is sent anywhere.

How to use it

  1. Type a value and pick its unit.
  2. Set the base font size. Leave 16 if you have not changed the root font size.
  3. Read the same length in rem, px, em, pt and percent. The rem result has a Copy button.

Formulas

Conversion Formula
px → rem rem = px ÷ base
rem → px px = rem × base
px → pt pt = px × 0.75
rem → % % = rem × 100

Common sizes at a 16 px base

px rem pt
8 0.5 6
10 0.625 7.5
12 0.75 9
14 0.875 10.5
16 1 12
18 1.125 13.5
20 1.25 15
24 1.5 18
32 2 24
48 3 36
64 4 48

Worked example

A heading is 28 px in the design and the base is 16 px. The rem value is 28 ÷ 16 = 1.75, which is 175 % of the base and 21 pt. In CSS write font-size: 1.75rem;.

Frequently asked questions

How do I convert px to rem?

Divide the pixels by the base font size. With the usual 16 px base, 24 px is 24 ÷ 16 = 1.5 rem. To go back, multiply rem by the base, so 1.25 rem is 1.25 × 16 = 20 px.

What is the base font size?

It is the font size of the root element (html). Browsers default to 16 px, but if your CSS sets html { font-size: 62.5% } the base becomes 10 px, and 1.6 rem is then 16 px. Enter your own base here to match.

What is the difference between rem and em?

rem is always relative to the root font size. em is relative to the font size of the parent element, so nested em values multiply. This tool assumes the parent equals the base size, which is exact for a top-level element.

How many pixels is one pt?

In CSS, 1 inch is 96 px and also 72 pt, so 1 pt is 96 ÷ 72 = 1.3333 px. A 12 pt font is 16 px.

Why use rem instead of px for font sizes?

rem values scale when a reader changes the browser's default font size, while px values stay fixed. That is why rem is recommended for text, spacing and media queries that should follow user settings.

More in Unit converters

All tools in this category: Unit converters ·Updated November 3, 2026

Privacy choices

Google Analytics shows us which tools are used and whether they work. It may set cookies. Your choice is kept in this browser.