Kharabeesh
On-device ع

CSS Units Converter

Convert between px, rem, em, %, vw, vh, pt, cm and more using your root font size and viewport, with a px-to-rem table and vw values on common screens.

Free, no sign-up Your data stays on your device Works offline after first open

The tool

Loading the tool…

How to use

  1. Enter the value and choose its unit.
  2. Set the root font size (usually 16px), the parent font size for em or %, and the viewport for vw and vh.
  3. Copy the value in any unit from the table.
  4. Use the quick px ↔ rem table and the common-screens table for viewport units.

Privacy & how it works

Processes your data in the browser and stores nothing.

  • Engine: lightweight in-page code, no external libraries.
  • Works offline after you open it once.

Frequently asked questions

What is the difference between rem and em?

rem is relative to the font size of the html (root) element, so it is the same across the page. em is relative to the parent’s font size, so it compounds when elements are nested.

Why is 1pt = 1.333px?

In CSS an inch is defined as 96px and an inch is 72pt, so 1pt = 96 ÷ 72 = 1.333px. These are CSS reference units, not necessarily physical sizes on your screen.

What is % relative to here?

Here % is relative to the parent font size (as in font-size: 150%). For properties like width it is relative to the container width, so enter the container width as the “parent size” if you need that.

Formulas & sources

Related tools