Page & Bell

PX ⇄ REM Converter

Type in either field and the other updates instantly: rem = px ÷ root font size and px = rem × root font size. The root defaults to 16px — the value every major browser ships with — and is remembered between visits if you change it. Below the converter you get a full 1–64px reference table at your chosen root, with one-click copy for each CSS value.

16px = 1rem  (root: 16px)
Conversion table: 1–64px at root 16px
pxrem
1px0.0625rem
2px0.125rem
3px0.1875rem
4px0.25rem
5px0.3125rem
6px0.375rem
7px0.4375rem
8px0.5rem
9px0.5625rem
10px0.625rem
11px0.6875rem
12px0.75rem
13px0.8125rem
14px0.875rem
15px0.9375rem
16px1rem
17px1.0625rem
18px1.125rem
19px1.1875rem
20px1.25rem
21px1.3125rem
22px1.375rem
23px1.4375rem
24px1.5rem
25px1.5625rem
26px1.625rem
27px1.6875rem
28px1.75rem
29px1.8125rem
30px1.875rem
31px1.9375rem
32px2rem
33px2.0625rem
34px2.125rem
35px2.1875rem
36px2.25rem
37px2.3125rem
38px2.375rem
39px2.4375rem
40px2.5rem
41px2.5625rem
42px2.625rem
43px2.6875rem
44px2.75rem
45px2.8125rem
46px2.875rem
47px2.9375rem
48px3rem
49px3.0625rem
50px3.125rem
51px3.1875rem
52px3.25rem
53px3.3125rem
54px3.375rem
55px3.4375rem
56px3.5rem
57px3.5625rem
58px3.625rem
59px3.6875rem
60px3.75rem
61px3.8125rem
62px3.875rem
63px3.9375rem
64px4rem

How to use the px ⇄ rem converter

  1. Enter a px value (or a rem value — the inputs are synced both ways). Comma decimals like 12,5 are accepted.
  2. Adjust the root font size if your project changes it (for example the 62.5% trick makes it 10px). It persists in your browser.
  3. Copy the bare value (0.625rem) or the full declaration (font-size: 0.625rem;).
  4. Open the conversion table for the full 1–64px range at your current root.

Common values at the 16px default

pxremTypical use
12px0.75remcaptions, legal text
14px0.875remsecondary UI text
16px1rembody text baseline
20px1.25remlead paragraphs, h4
24px1.5remh3, large UI
32px2remh2
48px3remh1, hero text

Notice the awkward ones are missing: 13px is 0.8125rem and 15px is 0.9375rem. Design systems built on a 4px grid (12, 16, 20, 24…) produce tidy rem values at a 16px root, which is one quiet argument for sticking to the grid.

A worked accessibility example

A user with presbyopia sets their browser default from 16px to 20px — a 25% increase. On a rem-based site, your 1rem body text renders at 20px and your 2rem headings at 40px; the whole hierarchy scales proportionally and nothing else changes. On a px-based site, every font-size: 16px stays 16px — the preference does nothing, and the user has to zoom instead, which also enlarges images and can break fixed layouts. Same CSS effort, very different outcome for the person reading.

Frequently asked questions

What is the exact formula for px to rem?

rem = px ÷ root font size, where the root is the computed font-size of the html element — 16px by default in Chrome, Firefox, Safari, and Edge. Examples at the 16px default: 10px = 0.625rem, 12px = 0.75rem, 14px = 0.875rem, 18px = 1.125rem, 24px = 1.5rem, 32px = 2rem. Going the other way: px = rem × root, so 1.25rem = 20px.

Why use rem instead of px for font sizes?

Accessibility. Users with low vision often raise their browser’s default font size (Settings → Appearance in Chrome) instead of zooming. Suppose a user sets the default to 20px: text set in rem scales — 1rem becomes 20px, 1.5rem becomes 30px — while text hard-coded as font-size: 16px stays 16px, silently ignoring the user’s explicit preference. WCAG 1.4.4 requires text to be resizable up to 200%; rem-based sizing satisfies the font-size-preference path, px-based sizing does not. Browser zoom (Ctrl/Cmd +) scales both, but you don’t control which mechanism your users rely on.

What is the html { font-size: 62.5% } trick, and should I use it?

Setting the root to 62.5% of the 16px default makes 1rem = 10px, so the mental math becomes trivial: 1.6rem = 16px, 2.4rem = 24px. The tradeoffs: every third-party stylesheet and component library that assumes 1rem = 16px will render 37.5% smaller until you compensate; you must immediately reset body to 1.6rem; and the design system gains a hidden global dependency that surprises every new developer. It still respects user preferences (62.5% of 20px = 12.5px, so everything scales), but most modern teams skip it — with this converter or CSS custom properties, the arithmetic was never the hard part.

When is px actually the right unit?

Anywhere scaling with the user’s text-size preference would hurt rather than help: borders (a 1px hairline should stay a hairline at any text size), box shadows, outline widths, and usually border-radius. Media-query breakpoints are a debated case — em-based queries handle some zoom edge cases better — but px breakpoints are common and defensible. The rule of thumb: typography, spacing tied to text, and max-widths of text columns in rem; decorative geometry in px.

What is the difference between rem and em?

Identical arithmetic, different reference. rem divides by the root (html) font size — one global, predictable base. em divides by the element’s own inherited font size, so ems compound: a 1.2em element inside a 1.2em parent renders at 1.44 × the base, which is why deeply nested em sizing drifts unpredictably. Use em deliberately for things that should scale with their local context — padding inside a button, an icon next to a label — and rem for everything tied to the page-wide scale.

Why does the tool show 4 decimal places at most?

Because that is the precision where browser rendering differences stop mattering. 13px at a 16px root is exactly 0.8125rem (shown in full), while 13px at an 18px root is 0.72222…rem, which the tool rounds to 0.7222rem — a discrepancy of less than 0.0004px at typical sizes, far below the half-pixel threshold where any screen could render a difference. Trailing zeros are trimmed, so 10px shows as 0.625rem, not 0.6250rem.

Related tools

Learn more