CSS Unit Converter

Enter one value and see it in every common CSS unit. Adjust base font and viewport so rem, em, vw, and vh match your layout.

Number and unit to convert from
Context

How the converter works

You enter a single value and its unit. The tool converts that value to pixels using your base font (for rem), parent font (for em and %), and viewport (for vw, vh, vmin, vmax). Then it expresses the same length in every other unit.

Units covered

PX is the reference. EM and % use the parent font size. REM uses the root (base) font size. PT uses the 96dpi rule (1pt = 4/3 px). Viewport units use the dimensions you set so you can match a real breakpoint.

When results differ from the browser

Browsers use the real viewport and the computed font sizes of the element and root. This tool uses the numbers you type. For rem and em, set base and parent to match your CSS. For vw and vh, set the viewport size you care about (e.g. 375 for a narrow layout).