Instant • private • developer-friendly

CSS Unit Converter

Enter a value in px, rem, em, % or vw/vh with a live base size to instantly see it converted into every other unit.

🔒 Values stay on your device and are never uploaded.

Convert CSS length units accurately

rem, em, percent and viewport units are all relative, so converting them to pixels depends on your root font size, the parent element's size, and the viewport dimensions. Set those values once here to get accurate conversions for your actual layout.

Configurable base

Set root font size, parent size and viewport dimensions to match your real design context.

All units at once

See px, rem, em, %, vw and vh side by side from a single input value.

Private by design

Conversion is simple arithmetic performed entirely in your browser.

CSS unit converter FAQ

What is the difference between rem and em?

rem is always relative to the root (html) font size, while em is relative to the font size of the current element's parent, so em can compound in nested elements.

How is percent converted here?

Percent is calculated relative to the parent size you set, matching how percentage font-size and width values behave in CSS.

How are vw and vh calculated?

1vw equals 1% of the viewport width and 1vh equals 1% of the viewport height, based on the viewport size you enter.

Is my data uploaded anywhere?

No. All conversion happens locally in your browser.