Skip to main content
Frontend / CSS Tools

PX to REM Converter

Convert pixel values to rem, with a configurable root font size - the common default is 16px, but this tool never assumes that silently.

Enter a pixel value and your root font size - this tool divides correctly and shows the exact formula used.

For the reverse conversion, see the REM to PX Converter - or use the full CSS Unit Converter for more unit types at once.

The px to rem Formula

rem value = pixels ÷ root font size. With the standard 16px root, 24px becomes 1.5rem - but if your project sets a different root size (common for accessibility or design-system reasons), the result changes accordingly.

Why Use This Tool?

Doing this division by hand repeatedly while converting a whole stylesheet is tedious and easy to mistype - this tool does the arithmetic instantly and shows the formula so you can verify it.

How to Use It

  1. Enter your pixel value.
  2. Set your root font size (16px by default - change it if your project uses a different base).
  3. Read the resulting rem value.

Common Errors

The most common mistake is assuming 16px when a project has actually set a different root size (e.g. many design systems use 62.5% on html, making 1rem = 10px) - always confirm your project's actual root size rather than assuming.

Share this tool: