PX to REM Converter

Convert between px, rem, em, pt and percent with the right base.

DesignFreeNo sign-up
Loading tool…

Runs entirely in your browser — nothing you enter is uploaded or stored on a server.

How to use it

Convert any CSS length between px, rem, em, pt and percent, with both the root and the parent font size on screen so em and percent are right rather than assumed. Includes a reference table of common sizes and a one-click export as CSS variables.

  1. Enter a value and pick the unit it is in.
  2. Set the root font size, and the parent font size if you are working in em or %.
  3. Copy the equivalent you need, or export the common sizes as CSS variables.
DesignersDevelopersFront-end engineers

Questions

Why use rem instead of px?

A reader who raises the default font size in their browser gets larger text everywhere sized in rem. A px value ignores that setting completely, which is an accessibility failure rather than a style choice.

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 element itself or its parent, so nested ems compound — 1.5em inside 1.5em is 2.25 times the base.

Is the root font size always 16px?

It is the browser default, but a reader can change it and some sites override it. That is exactly why sizing in rem is worth doing — and why this tool lets you set the base rather than hard-coding 16.

When should I use pt?

Print stylesheets. On screen, 1pt is defined as 1/72 inch and maps to 1.333px, but px and rem are the units the web is actually built in.