CSS Unit Converter
Convert CSS units with typography and viewport context. Compare px, rem, em, %, vw/vh and print units, copy results or review history.
Convert CSS units with typography and viewport context. Compare px, rem, em, %, vw/vh and print units, copy results or review history.
- Prepare your input
Choose the relevant options using the controls below.
- Run your task
Adjust the controls below and inspect the preview.
- Use the result
Check the result, then use the available copy or download controls.
CSS absolute units use 96px = 1in, independent of screen DPI. Percentages here refer to the supplied font-size base. ch/ex use an approximate 0.5em fallback; actual font metrics can differ. Results round to four decimal places.
Input Value
Conversion Context
Converted Values
CSS Unit Converter
Convert a CSS value into the units your layout or design system needs. The tool supports px, em, rem, percentages, viewport units, print units and the relative ch/ex units. Set the root and parent font sizes, viewport width and height, and the 96 DPI print context before interpreting context-dependent results.
Results are rounded to four decimal places. ch and ex use an approximate 0.5em fallback, so actual font metrics can differ. Use typography, spacing and common-value presets to start quickly; the local history keeps the ten most recent conversions.
Features
- Convert between 15 CSS units, including relative, viewport and print units.
- Set root/parent font size, viewport dimensions and print DPI context.
- Use typography, spacing and common-value presets.
- Copy one result, all results or CSS-formatted output; review up to ten history entries.
How to use
- Enter a numeric value and choose its source unit.
- Open context settings when the unit depends on font size or viewport dimensions.
- Review the converted values and the formula or hint shown for each unit.
- Copy one result, all results or CSS output; use history to return to a recent conversion.