CSS Unit Converter
CoreConvert rem, px, em, viewport, and physical CSS dimensions with real-time accuracy.
Live ConverterInstant
Type any number to see the instant live calculation.
1rem is defined as exactly 16px.
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.
Batch Converter
Convert multiple CSS values simultaneously into tabular format.
Conversion Table
| Input | PX | EM | PT |
|---|---|---|---|
| 0.5rem | 8px | 0.5em | 6pt |
| 1rem | 16px | 1em | 12pt |
| 1.25rem | 20px | 1.25em | 15pt |
| 1.5rem | 24px | 1.5em | 18pt |
| 2rem | 32px | 2em | 24pt |
| 3rem | 48px | 3em | 36pt |
CSS Value Converter
Paste raw CSS code to batch convert unit values while preserving formatting.
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
Color Converter
Bidirectional color conversion across HEX, RGB, RGBA, HSL, HSLA, HSV, and OKLCH.
Color Contrast Checker
Calculate WCAG 2.1 contrast ratios and verify accessibility compliance for normal text, large text, and UI components.
CSS Shadow Generator
Design multi-layered smooth box-shadows with offset, blur, spread, color, and inset controls.