📏 CSS Unit Converter
Convert between px, rem, em, pt, vw, vh, and percent instantly.
px
px
px
Quick Reference
| Unit | Relative To | Common Use |
|---|---|---|
| px | Absolute pixel | Fixed sizes |
| rem | Root font size | Typography scales |
| em | Parent font size | Component-relative |
| pt | 1/72 of an inch | Print styles |
| vw | 1% viewport width | Fluid layouts |
| vh | 1% viewport height | Full-height sections |
About CSS Units
CSS has multiple unit systems for sizing. This converter helps you translate between them using a configurable base font size and viewport dimensions.
Frequently Asked Questions
What is the default base font size?
16px is the browser default, but you can change it above to match your project's root font-size.
What's the difference between rem and em?
rem is relative to the root (html) font size. em is relative to the current element's font size. 1rem always equals the base font size, while 1em depends on context.