CSS Unit Converter

px, rem, em, vw, vh, %, pt and other units conversion

Baseline Settings

Unit conversion

Display the conversion formula after entering the value

CSS unit description

px (pixels)

Absolute units, 1px = 1/96 inch. Most commonly used unit, but not conducive to responsive design.

rem (root em)

font-size relative to the root element (html). Recommended for responsive layouts.

em

The font-size relative to the parent element. It will be inherited layer by layer, so be careful when using it.

vw / vh

1% of the viewport width/height. Suitable for full screen layouts and responsive fonts.

vmin / vmax

1% of the smaller/larger value of the viewport width. Good for keeping element proportions.

% (percent)

The corresponding attribute relative to the parent element. width: 50% means half the width of the parent element.