🫧 SUGI

Advertisement

📐

Pixel to REM and EM Converter for CSS Sizes

Convert px to rem and em, or rem back to px, from any base font size you type. Handy for CSS font sizes and spacing. Free, no sign-up, runs in your browser.

Advertisement

About this tool

A px to rem converter (px rem conversion, px to em, CSS font size calculator, rem to px) changes pixel sizes into relative units that scale with the reader's font setting.

Type the base font size that 1rem equals in your project, then a pixel value to get rem and em, or a rem value to get pixels. rem = px / base and px = rem x base.

For example, with a base of 16, 24 px is 24 / 16 = 1.5 rem, and 2.5 rem is 2.5 x 16 = 40 px; with a base of 10, 24 px is 2.4 rem. What is the difference between rem and em?

Rem is relative to the root font size, while em is relative to the parent element, so the em result here assumes the parent font size equals your base. Why use rem instead of px?

Rem sizes follow the user's browser font preference, which helps readability and accessibility. Nested em values multiply, so check them in your own layout.

The base is your project's choice, not a fixed rule, and many browsers default to 16 px. For image and screen sizes see the Aspect Ratio Calculator, and for other units the Unit Converter.

Calculated in your browser; nothing is saved or sent.

How to use

  1. Enter the base font size in pixels that equals 1rem in your project.
  2. Type a pixel value to get rem and em, or a rem value to get pixels.
  3. Copy the result into your CSS and check it in the browser.

Similar free tools

Made by SUGI and checked against our content guidelines · Last updated 2026-11-09 · How we make content

Advertisement