CSS Unit Converter

Convert between px, rem, em, vh, vw, pt, and percent. Configure base font size and viewport dimensions to get accurate results for your specific project.

CSS Unit Reference

CSS supports both absolute units (px, pt) and relative units (rem, em, vh, vw, %). Relative units are preferred for accessible, responsive designs because they scale with user preferences and viewport size.

When to use each unit

px - borders, shadows, fixed-width elements, icon sizes
rem - font sizes, spacing - scales with the root font size preference
em - padding and margin relative to the element's own font size
vh / vw - full-screen sections, hero heights, responsive widths
% - widths relative to the parent container

Related tools