CSS Unit Converter

Convert between px, em, rem and pt.

About this tool

Convert between the CSS units web developers use most \u2014 pixels, em, rem and points \u2014 based on a base font size (16px by default, the common browser default).

Key Features

  • Converts px, em, rem and pt
  • Adjustable base font size
  • Uses the standard 96px = 1in = 72pt relationship for pt

How to Use

  1. Enter the value.
  2. Choose the From and To units.
  3. Adjust the base font size if it isn't 16px.
  4. Click Convert.

Benefits

  • Convert legacy px-based designs to rem for accessibility
  • Check point-to-pixel conversions for print/screen work
  • Quick reference while writing CSS

Frequently Asked Questions

Both scale relative to a font size, but em is relative to the *parent* element's font size (so it can compound when nested), while rem is always relative to the root (html) element's font size. This calculator computes both the same way, using the base font size you provide \u2014 for em, that means the immediate parent's size, and for rem, the root's size.
That's the standard CSS reference pixel density used by browsers, which is where the fixed 1pt = 1.333px relationship comes from (96px \u00f7 72pt per inch).

Related Calculators

Related guides

Browse all Calculators