CSS Unit Converter
Convert between px, em, rem, pt, and percent — with a configurable root font size.
How to use this tool
Set the root font size (default 16px, the browser default), enter a value, then choose the "from" and "to" units. The result updates instantly.
About these conversions
px is the base unit. rem and em both equal (value × root font size) in this tool — a simplification, since true em depends on the parent element's actual font size in a real page, which this tool can't know. pt is fixed: 1pt = 96/72 px ≈ 1.333px, independent of root font size. Percent (%) is relative to the root font size (100% = root size).
Frequently asked questions
What's the difference between rem and em?
rem is always relative to the root (html) element's font size, so it's consistent everywhere on a page. em is relative to the current element's own font size (or its parent's, for font-size itself), which can compound when nested — this tool simplifies em to match rem's base, since true em depends on cascading context this tool can't know.
How is pt related to px?
1 point (pt) = 1/72 inch, and the CSS reference pixel is defined as 1/96 inch, so 1pt = 96/72 px ≈ 1.333px. This is a fixed relationship, not affected by root font size.