Advertisement

CSS Unit Converter

Core

Convert rem, px, em, viewport, and physical CSS dimensions with real-time accuracy.

Live ConverterInstant

Type any number to see the instant live calculation.

Root Em
Direct Math
Pixel
16
Direct Math
Formula: 1rem × 16px (root font size) = 16px

1rem is defined as exactly 16px.

px
Presets:
How it works: rem is relative to the root (<html>) font size. With a 16px root font size, 1rem = 16px, 2rem = 32px, and 0.5rem = 8px.

Common ConversionsRoot: 16px

Click any preset to populate the converter immediately.

Clickable presets

Batch Converter

Convert multiple CSS values simultaneously into tabular format.

px
6 lines detected

Conversion Table

InputPXEMPT
0.5rem8px0.5em6pt
1rem16px1em12pt
1.25rem20px1.25em15pt
1.5rem24px1.5em18pt
2rem32px2em24pt
3rem48px3em36pt
Values calculate dynamically with root font size 16px and parent context 16px.

CSS Value Converter

Paste raw CSS code to batch convert unit values while preserving formatting.

Root Font Size:
px
8 values converted

How It Works

The CSS Unit Converter maps values across 15 distinct units using the CSS reference pixel (px) as a canonical intermediate baseline.

  • Root Em (rem): Calculated relative to the root (<html>) font size (px = rem × rootFontSize).
  • Em (em): Calculated relative to the parent or local element context (px = em × contextFontSize).
  • Viewport Units (vw, vh, vmin, vmax): Calculated against the active viewport screen dimensions.
  • Physical Print Units (pt, pc, in, cm, mm): Fixed to the 96 DPI CSS reference coordinate system.

Related Frontend Tools

Browse all 17 tools →