1001Tools

CSS Unit Converter

Convert CSS lengths between px, rem, em, pt, pc, in, cm, mm, %, vw and vh with your own root font size and viewport, and bulk-convert px to rem in a CSS snippet.

Context

rem uses the root font size; em and % use the parent font size; vw and vh use the viewport.

Convert a Value

UnitValue
px Pixels16px
rem Root em1rem
em Em (parent font size)1em
% Percent (of parent font size)100%
pt Points12pt
pc Picas1pc
in Inches0.1667in
cm Centimeters0.4233cm
mm Millimeters4.2333mm
vw Viewport width1.1111vw
vh Viewport height1.7778vh

Bulk px to rem

Paste CSS and every px value is converted to rem using the root font size.

6 values converted

CSS

Related tools