PX to REM Converter

Convert pixels (px) to Root em (rem) for responsive web design.

Default is usually 16px
Bidirectional

CSS Output

font-size: 1.5rem; /* 24px */

Why Use REM?

REM (Root EM) is a scalable unit in CSS. Unlike pixels (px), which are fixed, REM units scale based on the user's browser font size settings. This improves accessibility and responsiveness.

The Math

REM = Pixels / Base Size

If your base font-size (on the `html` element) is 16px (the browser default):

  • 16px = 1rem
  • 24px = 1.5rem
  • 32px = 2rem

62.5% Trick

Many developers set html { font-size: 62.5%; }. Since 62.5% of 16px is 10px, this makes the math easy (10px = 1rem, 16px = 1.6rem). If you use this trick, set the Root Font Size to 10 above.

🍪 Cookie Consent

We value your privacy and want to be transparent about the data we collect.

We use cookies and similar technologies to enhance your experience, analyze traffic, and for advertising purposes. You can choose which categories to consent to.