PX to REM Converter

Convert between px, rem, em, pt, vw and vh.

Your input

px
px
px
px
In pixels 24 px
px
24 px
rem
1.5 rem
em
1.5 em
pt
18 pt
vw
1.6667 vw
vh
2.6667 vh
% of parent font
150%
  • 1 rem is the root font size (16 px by default); 1 em is the parent element’s font size; 1 pt is 1/72 inch = 1.333 px in CSS.

What are px, rem and em?

A pixel (px) is a fixed CSS unit. A rem is relative to the root font size of the page, which is 16 px by default, so 1 rem is 16 px and 24 px is 1.5 rem. An em is relative to the font size of the parent element, so it can change from one place to the next.

Other units include points (pt), where 1 pt is 1.333 px in CSS, and vw and vh, which are 1 percent of the viewport width and height. This tool converts between all of them. You set the root size, the parent size and the viewport, so the numbers match your design.

How to use the PX to REM Converter

  1. Enter the value and choose the unit you are converting from.
  2. Set the root font size, parent font size and viewport if yours differ.
  3. Read all the converted values.
  4. Copy the one you need.

Real situations

When people use the PX to REM Converter

  • 1

    Turn a design in pixels into rem

    Convert a designer's px values into rem so text respects user font settings.

  • 2

    Check a print or point size

    Convert a font size given in points, for example from a print style guide, into pixels for CSS.

  • 3

    Work out viewport units

    See what a pixel size is as a share of a 1440 by 900 screen, using vw and vh.

  • 4

    Calculate em for nested elements

    Convert a value against the parent size that applies in your component.

FAQ

PX to REM Converter: questions answered

What is 24 px in rem?

1.5 rem with the default 16 px root. It is also 1.5 em if the parent is 16 px, 18 pt, and 150 percent of the parent font.

How many pixels is 12 pt?

16 px. CSS defines 1 inch as 96 px and 1 inch as 72 pt, so 1 pt is 96 ÷ 72 = 1.333 px.

Why use rem instead of px?

Rem values scale with the root font size, so if a visitor increases their browser's default text size, rem-based layouts grow with it. Fixed px values do not.

What is the difference between rem and em?

Rem always refers to the root element's font size. Em refers to the font size of the element's parent, so nested elements using em can multiply. This is why rem is simpler to reason about.

What do vw and vh mean?

1 vw is 1 percent of the viewport width, and 1 vh is 1 percent of the height. With the default 1440 by 900 viewport, 24 px is about 1.67 vw and 2.67 vh.

What if my root size is not 16 px?

Change the Root font size field. Some projects set the root to 62.5 percent, which makes it 10 px so that 1 rem is 10 px. Use whatever your stylesheet sets.

Is this PX to REM Converter free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way