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.

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

Converted Values

1em
Em units scale relative to parent font-size. Great for component-based scaling.
1rem
Rem units scale relative to root font-size. Recommended for consistent spacing.
100%
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.
0.8333vw
Viewport width units. 1vw = 1% of viewport width. Great for responsive typography.
1.4815vh
Viewport height units. 1vh = 1% of viewport height. Perfect for full-screen sections.
1.4815vmin
Viewport minimum. 1vmin = 1% of smaller viewport dimension.
0.8333vmax
Viewport maximum. 1vmax = 1% of larger viewport dimension.
12pt
Points are used in print. 1pt = 1/72 inch. Common in @media print stylesheets.
1pc
Picas are print units. 1pc = 12pt = 1/6 inch.
0.4233cm
Centimeters. Metric unit mainly used for print. 1cm ≈ 37.8px at 96 DPI.
4.2333mm
Millimeters. Metric unit mainly used for print. 10mm = 1cm.
0.1667in
Inches. Imperial unit. 1in = 96px at standard DPI. Used for print.
2chApproximate
Approximate (0.5em)
2exApproximate
Approximate (0.5em)

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

  1. Enter a numeric value and choose its source unit.
  2. Open context settings when the unit depends on font size or viewport dimensions.
  3. Review the converted values and the formula or hint shown for each unit.
  4. Copy one result, all results or CSS output; use history to return to a recent conversion.