CSS / FRONTEND · RUNS IN YOUR BROWSER

PX to REM Converter

Convert pixels to rem with a configurable root font size and a reference table.

Root font size defaults to 16px and accepts 1 to 200px; the reference table covers 1px to 128px. Results are rounded to four decimal places.

Input

Browsers default to 16px. If your project changed the html font-size, enter that value instead.

Result

REM1.5rem

Common size reference

PixelsREM
1px0.0625rem
2px0.125rem
4px0.25rem
6px0.375rem
8px0.5rem
10px0.625rem
12px0.75rem
14px0.875rem
16px1rem
18px1.125rem
20px1.25rem
24px1.5rem
28px1.75rem
32px2rem
36px2.25rem
40px2.5rem
48px3rem
56px3.5rem
64px4rem
72px4.5rem
80px5rem
96px6rem
128px8rem

About this tool

Type a pixel value and the rem equivalent appears immediately; the two fields are linked, so editing either one updates the other. The root font size defaults to 16px, the browser default, and if your project changed the html font-size you can enter that instead to get the right answer. The table below covers everything from 1px to 128px for quick lookups.

How it works

  1. Confirm or change the root font size (16px by default).
  2. Enter a pixel value to get the rem result.
  3. Copy a single result, or read a common size from the table.

Privacy

Every calculation and preview runs inside this browser. Your input is never uploaded, stored, or written to the URL or any log.

Frequently asked questions

Why use rem instead of px?
rem is relative to the root font size, so when someone raises their browser's default text size the whole layout scales with it. A hard-coded px value ignores that preference entirely. Defining type and spacing in rem is standard practice for accessible sites.
How many rem is 16px?
At the default 16px root size, 16px is exactly 1rem, 24px is 1.5rem, and 12px is 0.75rem. In other words the rem value is the pixel value divided by 16.