CSS Unit Converter

Enter a value in any CSS unit — px, rem, em, vw, vh, pt, pc, or % — to see all other unit equivalents instantly. Set the root font size, viewport width, and parent element size to tailor the conversion to your project. Runs in your browser.

Browser-local No signup required Developer

Convert among px, rem, em, vw, vh, pt, pc, and percent using configurable root size, viewport width, and parent size assumptions.

How to convert CSS units

  1. Set root font size, viewport width, and parent size if the defaults are not appropriate.
  2. Enter a value in any supported unit field.
  3. Read the equivalent values propagated to the other unit fields.

Conversion assumptions

rem uses the root size, while em and percent use the parent size. vw uses viewport width.

vh is only an approximation here: the tool assumes viewport height equals 75% of the entered viewport width. pt uses 96 CSS px per inch and pc uses 16 px.

Privacy and limitations

All conversions happen in your browser. Results are arithmetic estimates based on the supplied assumptions, not measurements of the current page, element font size, or real viewport height.

CSS unit converter FAQ

Which units are supported?

px, rem, em, vw, vh, pt, pc, and %.

How is rem calculated?

Using the root size field.

How are em and percent calculated?

Using the parent size field.

Is vh based on my real browser height?

No. It assumes height is viewport width multiplied by 0.75.

Why can browser results differ?

Real CSS depends on actual computed font sizes and viewport dimensions.