PX to REM Converter

Convert between px and rem for your CSS, based on a root font size (16px by default). Switch direction to go either way, and copy the result with its unit.

1.5rem

Cómo usarlo

Enter a value and the root font size your project uses (browsers default to 16px). In PX→REM mode, the tool divides by the root size; in REM→PX mode, it multiplies — the same math the browser does when rendering rem units.

Using rem instead of px for font sizes and spacing makes a layout scale with the user's browser font-size setting, which is better for accessibility and responsive design. This converter takes the arithmetic out of switching a design from px to rem.

Preguntas frecuentes

What is the difference between px and rem?

A px is a fixed pixel. A rem is relative to the root element's font size — if that's 16px, then 1rem = 16px, 1.5rem = 24px. Because rem scales with the user's font-size preference, it's preferred for accessible, responsive typography.

What root font size should I use?

Most browsers default to 16px, so that's the usual base unless your CSS sets `html { font-size: … }`. If you've changed the root size, enter that here so the conversion matches what actually renders.

What's the difference between rem and em?

rem is always relative to the root font size, so it's predictable. em is relative to the font size of the current element's parent, so it compounds when nested. This tool converts px↔rem; rem is the more common choice for consistent scaling.

Is anything sent to a server?

No — it's simple arithmetic done entirely in your browser.

Más herramientas