CSS has more length units than anyone can keep straight in their head — and the right conversion depends on your root font size and viewport, not a single fixed ratio. This tool does the math for you.
What Is the CSS Unit Converter?
The CSS Unit Converter takes a single value in any CSS unit — px, rem, em, pt, vw, vh, or % — and shows its equivalent in every other unit, based on a root font size and viewport width you can adjust.
How to Use It
- Open the tool at /tools/css-unit-converter.
- Enter a value and pick its starting unit.
- Adjust the root font size (defaults to the browser standard 16px) and viewport width if you need vw/vh conversions.
- Read off every equivalent unit at once.
Key Features
- All seven common CSS units converted simultaneously from a single input.
- Configurable root font size, since rem/em/% conversions depend on it.
- Configurable viewport width, since vw/vh conversions depend on it.
- Honest about em’s limitation — since true
emdepends on a specific parent element’s font size, the tool clearly notes it approximatesemusing the same root size asrem.
When to Use This Tool
- Converting a design spec’s px values into rem for a codebase that uses rem-based sizing.
- Sanity-checking responsive typography that mixes vw and rem units.
- Quickly checking what a pt value from a print/PDF spec looks like in px.
Try It Now
Open CSS Unit Converter directly, or press ⌘K and type the tool name from anywhere on the site.
Part of the CSS Tools collection on WebdevToolbox — free, browser-based developer tools with no login required.