CSS Units Converter
Convert between PX, REM, EM, PT, %, vh, vw — keep typography consistent
Your files never leave your browser. Nothing is uploaded to any server. Privacy Policy
Convert between PX, REM, EM, PT, % and viewport units (vh, vw) using a configurable root font size and viewport size. Designers and developers use it to keep typography and spacing consistent when working with relative units in CSS.
How to convert CSS units
1
Set base size
Set the root font size (default 16px) — this controls REM math.
2
Enter a value
Type a value in any unit and the others update automatically.
3
Use the result
Copy the unit you need and paste it into your stylesheet.
Common CSS units
PX, REM, EM, PT, % and viewport units (vh, vw).
Custom base size
Set the root font size (default 16px) for accurate REM/EM math.
Viewport-aware
Converts vh/vw using your current window or a custom viewport size.
Copy any unit
Click to copy any converted value.
FAQ
REM is relative to the root html font size — predictable. EM is relative to the parent element's font size — useful for component-internal scaling.
Viewport units are great for responsive heroes, modals and full-screen layouts where you want size to scale with the viewport.
EM is relative to the parent's font-size. If a parent has 20px font-size, 1em equals 20px in that scope.
It depends on the property — width %s are relative to the parent width; font-size %s to the parent font-size.
Yes — the math uses your supplied base. Browsers may render fractional pixels differently due to subpixel rounding.