CSS Unit Converter

Convert between px, rem, em, vw, vh, and all CSS length units.

CSS Units Converter

Convert CSS lengths with separate root, parent, and viewport contexts.

= 24.00 px
24.0000px
1.5000rem
1.5000em
1.6667vw
2.6667vh
2.6667vmin
1.6667vmax
18.0000pt
0.6350cm
6.3500mm
0.2500in
150.0000%

Full conversion table

24.0000px | 1.5000rem | 1.5000em | 1.6667vw | 2.6667vh | 2.6667vmin | 1.6667vmax | 18.0000pt | 0.6350cm | 6.3500mm | 0.2500in | 150.0000%

Features

  • px, rem, em, viewport, physical, and percentage conversions
  • Separate root font, parent font, and viewport contexts
  • Adjustable precision and copyable equivalent table
  • Browser-local calculations with unit guidance

Context matters: rem uses the root font size, while em and % depend on the parent context; vw and vh depend on the viewport.

CSS units FAQ

What does rem depend on?

rem is relative to the root element font size.

What does em depend on?

em is relative to the current element or parent context, so this tool asks for a parent font size.

Can CSS units be converted exactly?

Only after the relevant root, parent, percentage, and viewport contexts are supplied.

Infinio Tools
© 2026 Infinio Labs