CSS Unit Converter
Convert between CSS units: px, rem, em, vw, vh, pt, cm, mm with custom root font size and viewport.
Settings
px
px
px
px
Presets
px
rem
em
vw
vh
pt
cm
mm
Reference
1 rem = 16 px (root: 16px)1 em = 16 px (parent: 16px)1 vw = 14.4 px (vp: 1440px)1 vh = 9 px (vp: 900px)1 pt = 1.33333 px1 cm = 37.7953 px
Tools run in your browser. Shared links may include your input; check the URL before sharing.
How to use
- Enter a value and select its unit.
- Match the conversion settings to your page.
This example illustrates one supported operation. Choose the matching mode and settings above; generated values and formatting may vary.
Example input or settings
32 px
root font-size: 16 pxExample result
2 remHow do rem and em differ?
rem uses the root font size. The em reference depends on the property and element font size.