CSS unit converter — real-time conversion between px, rem, em, vw, vh, pt, cm and mm. Customize base font size and viewport dimensions.
Conversion basis
❓ FAQ
What is the difference between rem and em?
rem is relative to the root element (html) font size; em is relative to the current element's font size. rem is more predictable for global layouts; em is useful for component-level scaling.
What are vw and vh?
vw (viewport width) is 1% of the viewport width; vh (viewport height) is 1% of the viewport height. They are commonly used in responsive layouts so elements scale with the screen size.
What is the difference between pt and px?
pt (point) is a print unit — 1pt = 1/72 inch. px is a screen pixel unit. At 96dpi, 1pt ≈ 1.333px. pt is commonly used in PDF and print stylesheets.
How do I set the base font size?
Most browsers default to 16px (1rem = 16px). If your project changes the html font-size, update the base font size in the settings panel to get accurate conversions.