Skip to main content

CSS Unit Converter

Convert CSS lengths between px, rem, em, %, viewport, and physical units with adjustable references. Values stay in your browser; relative conversions use your assumptions.

CSS length

-100,000 to 100,000

Reference values

1 to 1,000 px
1 to 1,000 px
1 to 10,000 px
1 to 10,000 px
1 to 10,000 px

Relative values use the references above. CSS percentages and em units can use different bases depending on the property, so treat these as estimates; negative values may be invalid for some properties. Absolute-unit conversions follow CSS's 96px-per-inch scale, not device DPI. Each number accepts up to 12 characters; the source value is limited to -100,000–100,000. Results round to at most 6 decimal places. CSS is not parsed or executed.

Converted values

Relative units

Root ems (rem)
1rem
Ems (em)
1em
Percent (%)
1.333333%
Viewport width (vw)
1.111111vw
Viewport height (vh)
1.777778vh
Viewport minimum (vmin)
1.777778vmin
Viewport maximum (vmax)
1.111111vmax

Absolute units

Pixels (px)
16px
Points (pt)
12pt
Picas (pc)
1pc
Inches (in)
0.166667in
Centimeters (cm)
0.423333cm
Millimeters (mm)
4.233333mm
Quarter-millimeters (Q)
16.933333Q

Was this tool helpful?