CSS Unit Converter

Convert a CSS size between pixels, em, rem, points, and percent, based on your chosen base font size.

px rem
Pixels (px)-
Em-
Rem-
Points (pt)-
Percent-
Advertisement
Advertisement

About CSS Units

CSS supports several sizing units: px is an absolute pixel value, em and rem scale relative to a font size (element or root respectively), pt is used mainly in print styles, and % scales relative to the parent.

Formula

Pixels = em or rem value × Base Font Size  |  Points = Pixels × (72 ÷ 96)

How to Use This Calculator

Example

24px with a 16px base font size equals 1.5em / 1.5rem, or 18pt.

Frequently Asked Questions

What CSS units does this convert between?

Common ones include px (pixels), em, rem, %, pt, and viewport units like vw/vh.

What's the difference between em and rem?

em is relative to the font size of its parent element (compounding in nested elements); rem is relative to the root (html) element's font size, making it more predictable.

Why do developers avoid fixed px for font sizes?

Relative units like rem scale better with user accessibility settings (like browser zoom or font-size preferences), improving responsiveness and accessibility.

Suggest a Calculator

👋 We noticed you might be using an ad blocker. This site is free thanks to ads — consider allowing them here to support us. Thanks!