PX to REM Converter

Convert pixel values to rem units and back, for scalable, accessible CSS.

Sizing that respects the user

A pixel is a fixed size, but a rem is relative to the root font size, which means rem-based layouts scale when a user changes their browser's font size — a real accessibility benefit that pixels lose. This converts between px and rem so you can work in whichever unit is comfortable and output the other, using the standard base where 16 pixels equals one rem.

Enter a pixel value to get rems, or a rem value to get pixels.

Why rem helps accessibility

The reason rem matters is that some people increase their default font size to read comfortably, and a design built entirely in pixels ignores that setting, leaving text stuck at the size you chose. Sizing type and spacing in rem lets the whole layout respond to the user's preference. The convention is the base of sixteen pixels; if your root font size differs, the conversion shifts accordingly. Working in rem is a small habit that makes a site usable for far more people.

Questions & answers

What is the standard px-to-rem base?

16 pixels to one rem, the default root font size, unless your project sets a different root size.

Why use rem instead of pixels?

Rem scales with the user's chosen font size, so text and layout respect accessibility settings that fixed pixels ignore.

Is anything uploaded?

No. The conversion happens in your browser.

More Developer tools