Free Converter

CSS Unit Converter

Convert between different CSS units - px, em, rem, %, vw, vh, and more

Unit Converter
Enter value and select units to convert
Conversion Result
Your converted value

Enter value and units to see conversion

CSS Units Reference
px
Pixels (px)
Absolute unit, 1px = 1/96th of an inch
em
Em (em)
Relative to parent element's font size
rem
Root Em (rem)
Relative to root element's font size
%
Percentage (%)
Relative to parent element
vw
Viewport Width (vw)
1% of viewport width
vh
Viewport Height (vh)
1% of viewport height
vmin
Viewport Min (vmin)
1% of viewport's smaller dimension
vmax
Viewport Max (vmax)
1% of viewport's larger dimension
pt
Points (pt)
Print unit, 1pt = 1/72nd of an inch
pc
Picas (pc)
Print unit, 1pc = 12pt
in
Inches (in)
Absolute unit, 1in = 96px
cm
Centimeters (cm)
Absolute unit, 1cm = 37.8px
mm
Millimeters (mm)
Absolute unit, 1mm = 3.78px
About CSS Unit Converter

CSS units are used to specify measurements in CSS properties. Understanding and converting between different units is essential for responsive web design and consistent styling.

Unit Categories:

  • Absolute Units: px, pt, pc, in, cm, mm - Fixed size regardless of context
  • Relative Units: em, rem, % - Size relative to another element
  • Viewport Units: vw, vh, vmin, vmax - Size relative to viewport dimensions

Common Use Cases:

  • Responsive web design
  • Typography scaling
  • Layout spacing
  • Media queries
  • Print stylesheets

Best Practices:

  • Use rem for font sizes
  • Use px for borders and small measurements
  • Use % for widths and heights
  • Use vw/vh for full-viewport elements
  • Consider accessibility and user preferences