ToolBuddy
In Browser

CSS Unit Converter

Convert CSS lengths between px, rem, em, pt, pc, in, cm, and mm. Set the base font size to match your root, then copy the value you need. Conversion is local.

Runs in your browser. Nothing is uploaded.

Enter a CSS length to see it in every unit. A bare number is read as px.

About this tool

Convert CSS lengths between px, rem, em, pt, pc, in, cm, and mm. Absolute units use the CSS reference of 96px per inch. rem and em follow the base font size you set, 16px by default.

How to use: type 24px, 1.5rem, or 12pt and copy the unit you need. Change the base font size if your root is not 16px. em here assumes the parent font size equals the base, so nested em values need their own base.

Example: 24px is 1.5rem at a 16px root and 18pt. Percentages, viewport units, and ch depend on layout, so they are left out.

Conversion is local. Related: color converter for the other half of a design token. After load, converting works offline.

Related Convert tools