CSS Unit Converter (px, rem, em, pt)

Convert between px, rem, em, pt, %, vw, vh, in, cm and mm with your own base font size.

Runs instantly in your browser — results update as you type.

How do I convert px to rem?

To convert pixels to rem, divide the pixel value by the root font size — 16 px by default. So 24px = 1.5rem and 12px = 0.75rem. rem units scale with the user's browser font setting, which helps accessibility.

How to use the CSS Unit Converter (px, rem, em, pt)

    Frequently asked questions

    Why use rem instead of px?

    rem respects the user's preferred font size in the browser, which makes text accessible and layouts scale consistently.

    What is the difference between em and rem?

    rem is always relative to the root font size; em is relative to the current element's font size and can compound when nested.

    How many px is 1pt?

    1pt = 1.333px in CSS (96px per inch, 72pt per inch).