CSS Unit Converter
Convert CSS units one-to-one between px, rem, em, %, vw, vh, vmin, vmax, pt, pc, in, cm, mm, q, ex, and ch locally using root font size, EM reference font size, viewport, and percentage reference settings. Absolute CSS units use the fixed ratio 1in = 96px.
Length Units
Typography
Viewport
Percentage
Length Units
Typography
Viewport
Percentage
Quick Start
Common Scenarios
Use cases
responsive layouts, design‑to‑dev handoff, cross‑density/print correlation, unified style conventions
Usage Advice
Parameters & Context
Limitations & Compatibility
Privacy & Security
FAQ
rem is relative to the root font size. em usually uses the current element’s computed font size; in font-size and similar font-relative properties, it uses the parent font size. Set the EM reference to the font size actually used by the property.
Prefer rem for layout and text (a11y); px is fine for crisp icons/borders
Mobile address bars/safe areas/scrollbars affect the viewport; combine with breakpoints and min/max constraints
CSS px conversion uses 1in = 96px and is not a physical screen-to-print conversion. Use a separate device/print workflow for physical pixels, printer resolution, ICC/proofing, and final output.