Skip to content
Toolbench

PX to REM converter

Convert pixels to REM online for free. Real-time PX to REM converter with custom base font size and live CSS snippet.

In your browser

Root <html> font size (browser default is 16px)

px
px
Absolute unit
rem
Relative to root
em
Relative to parent
CSS Snippet

            

Live Typography Preview

Editable preview at the exact font size.

Click inside the box to edit text

Common Font Size Reference Scale

Calculated using base font size of . Click any row to use it.

1rem =
Pixels REM EM Tailwind Class Action

About this tool

Convert pixel values to accessible CSS REM units in real time. Default base font size is 16px. Enter any pixel value to get the exact REM and copy the CSS.

How to use it

  1. 1 Enter your pixel (px) or REM value.
  2. 2 Adjust the base font size if your project root differs from 16px.
  3. 3 Copy the converted value or CSS snippet.

Questions

How many REM is 16px?

With the default base font size of 16px, 16px equals exactly 1rem.

Why should I use REM instead of PX in CSS?

REM units scale relative to the user’s browser root font size, making your website accessible to users who adjust default font sizing or zoom levels.

What is the standard base font size?

The default root font size in all modern web browsers is 16px (1rem = 16px).

What is the difference between REM and EM?

REM is relative to the root <html> element, while EM is relative to the font-size of its immediate parent container.

How do I calculate REM from PX?

Divide the pixel value by your base font size: px / base = rem (for example, 24px / 16px = 1.5rem).

Is my data uploaded?

No. This tool runs in your browser, so your text and files never reach our server.

Is this tool free?

Yes. It’s free to use with no sign-up and no limits for normal use.