PX / REM / EM / PT Converter

Convert CSS units between px, rem, em and pt using your base font size, with the em versus rem difference explained and a zero-base error message.

16px
1rem
1em
12pt
rem and em are equal here because em is measured against the same base size; nested em can differ in real CSS.

About PX / REM / EM / PT Converter

The PX / REM / EM / PT Converter switches CSS sizes between pixels, rem, em and points using your base font size.

Example

With a 16 px base, 24 px is 1.5 rem, 1.5 em and 18 pt.

rem vs em

rem is relative to the root font size, so it is the same everywhere. em is relative to the parent element, so it compounds when you nest elements.

Why rem is popular

Sizes in rem grow when a reader increases their browser's default font size, which helps accessibility.

Your base

Change the base if your site's root font size is not 16 px.

Private

Everything runs in your browser. Nothing you type is uploaded.

How to use it well

Choose the unit you have, type the value and copy the unit you need from the table. Reading the full table at once is faster than running four conversions. For colour values use the Color Converter, and for checking text contrast use the Contrast Checker. The tool converts values; it does not read your stylesheet or rewrite it.

Is it private?

The tool suits front-end developers, designers moving from design software to CSS and students learning CSS units. The calculation runs in your browser and nothing is uploaded.

How to use PX / REM / EM / PT Converter

  1. Enter the value you want to convert.
  2. Choose the unit you are converting from: px, rem, em or pt.
  3. Set the base font size in pixels (16 is the browser default).
  4. Read the same size in px, rem, em and pt.

Help & FAQ

How many rem is 24 px?

1.5 rem at a base of 16 px.

How many px is 12 pt?

16 px, because 1 pt is 4/3 px.

What is the base font size?

The root font size in pixels. The browser default is 16 px. Sites that set 62.5% use 10 px.

Why do rem and em show the same value?

The tool measures both against the same base. In real CSS, nested em values multiply and can differ from rem.

What happens if we enter a base of 0?

The tool says the base size must be above zero.

Is rem better than px?

Rem can respond to the user's default font-size setting when the root font size is relative, which can help accessibility. CSS pixels do not respond to that setting in the same way, although browser zoom enlarges both.

What is a pt in CSS?

A point, 1/72 of an inch, which is 4/3 of a CSS pixel.

Does it read our stylesheet?

No. It converts the values you type.

Can we use decimals?

Yes. 1.5 rem and 11.25 pt are examples from our tests.

Which units does it support?

px, rem, em and pt.

Can we convert percentages?

No. Percent sizes depend on the parent element.

Is our data uploaded?

No. The calculation runs in your browser.

More in Accessibility

See all 10 in Accessibility