CSS Unit Converter
Convert between CSS units instantly: px, rem, em, vw, vh, pt, cm, mm, in. Set your base font size and viewport width for accurate relative unit conversion.
px
px
px
→
All Units at Once
| Unit | Value | Notes |
|---|
Frequently asked
questions
rem (root em) is always relative to the root <html> element font size (default 16px). em is relative to the nearest parent element's font size, which can cascade and change depending on nesting. Use rem for consistent sizing.
By default, browsers set the root font size to 16px, so 1rem = 16px. If you or the user changes the browser font size, this ratio changes. The converter lets you set a custom base size.
vw (viewport width) and vh (viewport height) are useful for full-screen layouts, hero sections, and responsive typography. 1vw = 1% of the viewport width. 100vw = the full screen width.