📏 CSS Unit Converter

Convert between px, rem, em, pt, pc, in, cm, and mm with a custom root font size. All conversions update live.

Last updated: November 8, 2026 · By the BoltQuickTools team

px (browser default is 16px; needed for rem/em conversions)

All units from your "From" value

Turning a design measurement into a CSS value

A mockup says 14px and your codebase uses rem, or a print spec gives millimetres and you need pixels for a canvas. This page converts between eight CSS length units using the ratios the CSS specification fixes.

Converting a value

  1. Enter a number in From and pick its unit.
  2. Pick a unit in To. You can also type in the To box to convert in the other direction.
  3. Set Root font size if your project's html font size is not 16px. Press Enter or click away to apply it.
  4. Read every unit at once in the grid below, and click a cell to make it the new From value. The arrow button swaps From and To.

Examples

FromRootGrid shows
14 px16rem 0.875, em 0.875, pt 10.5, pc 0.875, in 0.145833, cm 0.370417, mm 3.704167
24 px10rem 2.4, em 2.4, pt 18, pc 1.5, in 0.25, cm 0.635, mm 6.35
1 in16px 96, rem 6, em 6, pt 72, pc 6, cm 2.54, mm 25.4
210 mm16px 793.700787, rem 49.606299, em 49.606299, pt 595.275591, pc 49.606299, in 8.267717, cm 21

The second row is the common html { font-size: 62.5%; } setup, where 1rem equals 10px. The last row is the width of an A4 page in CSS pixels, which is handy for print stylesheets.

What the converter does not account for

Swap rounding and the 10px root

Why does swapping give me 1.000032 instead of 1?

Swap converts from the rounded number in the box. 1px is shown as 0.010417in, and swapping converts that back, giving 1.000032px. For an exact reverse, retype the original value rather than swapping.

Should I use the 10px root trick?

It makes the arithmetic simple, but setting a percentage on html means all your rem values depend on it, and a rem-based third-party component written for a 16px root will come out smaller. The CSS units reference covers how each unit resolves.

Can I convert a whole stylesheet?

No, it handles one value at a time. For layouts where the unit choice matters, the layout generator lets you try track and gap sizes, and the CSS layouts article discusses when fixed and flexible sizes each make sense.