Skip to main content
>_devtools

CSS Unit Converter (px, rem, em, vw)

Convert px, rem, em, %, vw, vh, vmin, vmax, pt, cm, mm and in with your own root font size and viewport.

What it does

Enter a CSS length and select its source and target units. Set the root font size, parent size, and viewport dimensions to calculate context-dependent values.

Example

24px at a 16px root size -> 1.5rem

Limits and behavior

  • Conversions involving em, percent, and viewport units depend on the supplied context.
  • The output is a numeric CSS length and does not validate its use in a property.