Px To Rem Converter

Remove Ads
Remove Ads

Result

Result
Remove Ads

Share on Social Media:

PX to REM Converter — Pixel-Perfect Meets Accessible

Design tools speak pixels; accessible CSS speaks rem. This free converter translates between them instantly in both directions, at any root font size — 16px default or your design system's custom base — with batch conversion for entire spacing scales. In-browser, no signup.

The Formula

rem = px ÷ root font size — with the browser default root of 16px:

pxrempxrem
40.25241.5
80.5322
120.75402.5
140.875483
161644
181.125805
201.25966

Why rem Wins for Accessibility

Browsers let users set a larger default font size — distinct from zoom — and a meaningful share of users rely on it. Text sized in px ignores that setting entirely; text in rem scales with it. WCAG 1.4.4 requires text to be resizable to 200% without loss of functionality, and rem-based sizing is the most robust way to get there. Media queries defined in rem (not px) also keep breakpoints aligned with the user's actual text size.

The 62.5% Trick — And Its Caveat

Setting html { font-size: 62.5%; } makes 1rem = 10px, so 24px is a tidy 2.4rem. Convenient math, but it changes the meaning of rem across your whole codebase and breaks third-party components that assume a 16px root. Most modern teams keep the 16px default and let tooling (or this converter) handle the division.

Practical Conversion Policy

  • rem: font sizes, spacing scales, container widths, media query breakpoints.
  • em: padding/margins that should track a component's own font size.
  • px: borders (1px hairlines), shadows, and other details that shouldn't scale.

Free and Instant

Both directions, custom roots, batch mode — all computed locally with no account and no limits.