Bytelify

PX to Rem Converter

Convert pixel values to rem units, live as you type, based on the standard 16px root font size.

Runs in your browser, nothing sent
px-to-rem-converter

Assumes the default 16px root font size. Type in either field — the other updates live.

Need the opposite? Rem to PX Converter

What is PX to Rem Converter?

Convert a pixel value to the equivalent rem unit, assuming the standard 16px browser default root font size. It's the most common conversion needed when moving a CSS design from fixed px values to scalable rem units.

PX to Rem Converter Table

Pixels (px)Rem
8px0.5rem
12px0.75rem
16px1rem
20px1.25rem
24px1.5rem
32px2rem
40px2.5rem
48px3rem
64px4rem

How to Use the PX to Rem Converter

  1. 1

    Type a Pixel Value: Enter the px value from a design spec.

  2. 2

    Read the Rem Result Instantly: The rem equivalent appears automatically, based on a 16px root.

PX to Rem Formula

rem = pixels ÷ 16 (assuming the default 16px root font size; divide by your project's actual root size instead if it overrides the default)

Common PX to Rem Conversions

8px = 0.5rem 12px = 0.75rem 16px = 1rem (the base size) 20px = 1.25rem 24px = 1.5rem 32px = 2rem 48px = 3rem

How to Convert PX to Rem

Divide the pixel value by 16 (or by your project's actual root font-size in pixels, if it's not the 16px default). For example, 24px ÷ 16 = 1.5rem.

PX to Rem Examples

A design spec calling for a 14px font size becomes 14 ÷ 16 = 0.875rem in CSS. A 40px spacing value becomes 40 ÷ 16 = 2.5rem. If a project sets html { font-size: 62.5%; } (a common trick for 10px-based math), the root is 10px, not 16px, so divide by 10 instead.

FAQs

Frequently Asked Questions

Common questions about PX to Rem Converter.

16px is the default root font size in every major browser unless a site explicitly overrides it on the <html> element. If your project sets a different root size, scale the result accordingly.

rem units scale with the user's font-size preference and the page's root size, making layouts more accessible and easier to scale consistently.

Yes, Bytelify's PX to Rem Converter is free with no account or sign-up required.

No. The conversion runs entirely client-side in your browser, so nothing you enter is sent anywhere.