Skip to content

CSS Unit Converter

Enter a value in px, rem, em, pt or %, and see it converted to every other unit at once, based on a configurable root font size — the 16px-to-1rem conversion done for you, without the "wait, is it times 16 or divided by 16" moment.

  • Converts px, rem, em, pt and % simultaneously
  • Configurable base (root) font size
  • Correct 96px/72pt ratio for pt
  • Runs fully client-side

Converter

Calculated locally, nothing uploaded

px
rem
em
pt
%

How to convert CSS units

  1. 01

    Enter a value and its unit

    Type a number and pick which unit it currently is.

  2. 02

    Check the base font size

    Defaults to 16px, the browser default — change it if the page sets a different root font-size.

  3. 03

    Read the other units

    All four other units update instantly from the same value.

Why the base font size matters at all#

rem, em and % are relative units — they only mean something in relation to a base size, which is why 1.5rem is 24px on a page with the default 16px root font-size, but 30px on a page that sets html { font-size: 20px; }. This tool defaults the base to 16px, the actual browser default when nothing overrides it, but the base is editable specifically so the conversion stays correct on a page that changed it.

Where em quietly differs from rem, and why this tool can't fully model it#

rem is always relative to the root element's font-size, full stop — that's the entire reason it exists as a unit, to give a stable reference point unaffected by nesting. em is relative to the font-size of the element it's used on (or its parent, for font-size itself), which means the same 2em can mean a different pixel value in two different places on the same page if they sit inside containers with different font sizes. This tool treats em as equal to rem, using the single base font size entered — accurate only when nothing between the root and the element in question has changed the font-size. For deeply nested components with their own font-size rules, treat the em conversion here as a starting estimate, not a guarantee.

Where the pt conversion comes from#

pt is a print-era unit — 72 points per inch — while CSS px is defined as 96 "CSS pixels" per inch (a fixed ratio, not tied to actual screen DPI). That makes 1pt exactly 96/72, or 4/3, CSS px — a fixed, non-relative ratio, unlike rem/em/%, which all depend on the base font size.

Frequently asked questions

Why does 1rem sometimes not equal 16px?

Because rem is relative to the root font-size, and a page can override the browser default of 16px — commonly to something like 62.5% (10px) for easier mental math. Set the base font size in this tool to match what the page actually uses.

Is em treated exactly the same as rem here?

For this calculator's purposes, yes — both use the same base font size you enter. In real CSS, em is relative to the font-size of the element it's on (or its parent), which can differ from the root if something in between changed the font-size. Treat the em output as accurate only when nothing has overridden font-size along the way.

Why is 1pt not a round number of px?

pt is defined as 1/72 of an inch, while CSS px is defined as 1/96 of an inch — a fixed ratio of 4/3, independent of any base font size, unlike the relative units.

Is my data sent anywhere?

No. The conversion runs entirely in your browser.

Developers

UUID Generator

Generate cryptographically random UUID v4 or time-ordered UUID v7, in bulk.

Developers

Base64 Encoder & Decoder

Encode and decode Base64 with correct UTF-8 handling, including the URL-safe alphabet.

Developers

ULID Generator

Generate ULIDs — sortable by creation time like UUID v7, but Crockford Base32 instead of hex.