PX to REM Converter
Convert pixels and rem values using any root font size.
Your input is processed on this page and is not stored by us.
About this tool
rem units scale from the root element's font size, making typography and spacing easier to adjust consistently. The PX to REM Converter converts in either direction using any root size and lets you control decimal precision.
With the common browser default of 16 pixels, 24px equals 1.5rem, but a project may set another root value or allow users to enlarge text. Use rem where scaling should follow the root font size; keep pixels for true one-pixel details or values that should not scale in the same way. Converting every number mechanically is not a design system—choose a sensible spacing and type scale after calculating the equivalent values.
How to use it
- Select PX to REM or REM to PX according to the value you already have.
- Enter the source value, including decimals where necessary.
- Set the actual root font size used by the target page, commonly 16px.
- Choose enough decimal places for accuracy without creating noisy CSS.
- Copy the result and verify it in the browser at default and enlarged text settings.
Useful ways to apply it
- Translating design measurements into scalable CSS typography.
- Converting an existing pixel spacing scale into rem-based tokens.
- Checking the rendered pixel equivalent of a rem value during debugging.
- Working with a project whose root font size differs from the browser default.
- Preparing consistent values for clamp-based responsive typography.
Frequently asked questions
What does 1rem equal?
Is rem always better than px?
Why should I avoid setting the root to 62.5 percent?
How many decimal places should I keep?
Privacy
Your input is processed on this page and is not stored by us.