</> ConvertAtlas Developer Tools
Converters

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

Convert between px, rem, em, pt and percent.

Instant 100% in-browser Free

This tool converts between the CSS length units you use most — px, rem, em, pt and percent — based on a root font size you set. Type a value in any unit and see the equivalents update live.

How to use it

  1. Set the root font size (default 16px).
  2. Enter a value in any unit.
  3. The equivalent in the other units appears instantly.
  4. Copy whichever you need.

About CSS Units Converter

Modern CSS mixes absolute and relative units, and converting between them by hand means remembering that rem is relative to the root font size while px is fixed. When you are translating a design from pixels into scalable rem units — the accessible, responsive choice — doing the arithmetic repeatedly is tedious. This converter keeps all the common units in sync from a single input, using the root font size you specify, so you can move between a designer’s pixel values and maintainable relative units with confidence. It all runs in your browser.

FAQ

What is the difference between rem and em?

rem is relative to the root element’s font size; em is relative to the font size of the current element. This tool converts against the root size you set.

Why convert px to rem?

rem scales with the user’s font-size preference, making layouts more accessible and responsive than fixed pixels.

When should I use rem instead of px?

rem scales with the user's root font size, so it respects accessibility settings and makes responsive typography easier, while px is fixed. Using rem for font sizes and spacing is a modern best practice; px is fine for fine details like borders.