PX to REM Converter

Convert pixel sizes to rem for scalable, accessible CSS.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

Convert px to rem

The rem unit is relative to the root (html) element’s font size, so sizing typography and spacing in rem keeps your layout scalable and respects the user’s browser font-size preference for accessibility. This converter turns a pixel value into the equivalent rem for a given root size, helping you migrate a design from fixed pixels to relative units.

How it works

The conversion divides the pixel value by the root font size:

rem = px ÷ root font size (px)
px  = rem × root font size (px)

Unlike em, the divisor is always the root font size, so rem values do not compound through nesting. The default root of 16px matches the browser’s standard.

Example

Convert 24px with the default 16px root:

  • 24 ÷ 16 = 1.5rem

If the root were set to 10px (the “62.5%” technique), the same 24px would be 24 ÷ 10 = 2.4rem.

PixelsRootResult
24px16px1.5rem
8px16px0.5rem
24px10px2.4rem

Enter your numbers and the result updates instantly, all in your browser.

Ad placeholder (rectangle)