Converter

The default base size for most browsers is 16px.
px
px
rem

Common Sizes

Pixels REM

About the Pixel to REM Converter

In modern web development, using flexible units like REM (Root Em) is standard practice for creating accessible, responsive websites. Unlike pixels (px), which are fixed, REM units scale relative to the user's browser settings. This allows users with visual impairments to increase their font size and have your website layout adjust gracefully.

However, designers typically work in pixels (Figma, Sketch, Photoshop). This creates a gap where developers need to constantly translate pixel values into REMs. This tool bridges that gap instantly.

How it Works

The calculation is simple but tedious to do mentally:

REM = Pixels / Base Size

By default, the Base Size is 16px. So, 32px becomes 2rem (32 / 16). If you change the base size (for example, to 10px to simplify math), the calculator updates all conversions automatically.

Frequently Asked Questions

Why should I use REM instead of PX?

Using REMs ensures your website respects the user's browser preferences. If a user sets their default font size to "Large" (usually 20px or 24px), a site built with REMs will scale up proportionally. A site built with fixed pixels will ignore this setting, potentially making text too small to read.

What is the "62.5%" trick?

Many developers set the html { font-size: 62.5%; } in their CSS. This sets the base font size to 10px (62.5% of 16px). This makes math easy: 1.4rem = 14px, 2.0rem = 20px. If you use this trick, simply change the "Root Font Size" in our calculator to 10.

Does this work for EM units too?

Yes, mostly. While REM is relative to the root (html) element, EM is relative to the parent element. However, if there is no font-size set on the parent, 1em equals 1rem. You can use this calculator for EM values in those contexts.