DEVELOPER TOOL

CSS Unit Converter

Convert between px, em, rem, and pt for a given base font size.

rem and em are calculated relative to this — 16px is the typical browser default.

About this tool

Type a value into any field and see it converted to the other CSS units instantly. Rem is always relative to the root font size; em here is treated the same way, relative to the base font size you set above (in real layouts, em can also depend on a parent element's font size).

Frequently asked questions

What's the difference between rem and em in real CSS?
Rem is always relative to the root (html) element's font size. Em is relative to the font size of the closest element it's set on, which can compound in nested elements — this tool treats both relative to the single base size above for simplicity.
How is pt converted?
Using the standard 96 DPI conversion: 1pt = 1.333px (96/72), matching how browsers and design tools like Figma handle the px-to-pt relationship.
Why does changing the base font size affect rem and em but not px or pt?
Px and pt are absolute units with a fixed real-world size, while rem and em are inherently relative to a font size — changing that base changes what they resolve to.