PX to REM Converter
Convert pixels to rem and em against a configurable root font-size. Type in either field and the other updates instantly. Everything runs in your browser — nothing is sent anywhere and nothing is stored.
How to use the px to rem converter
- Set the root font-size (base) if your site uses something other than the standard
16px. - Type a value in the Pixels field to get the rem and em equivalents, or type in REM to get the pixels.
- Click Copy under any result to grab a ready-to-paste value like
1.5rem.
The math is simple: rem = px ÷ base and px = rem × base. At a 16px base, common values are
12px = 0.75rem, 14px = 0.875rem, 24px = 1.5rem and 32px = 2rem.
Common px to rem values
| Pixels | REM | EM |
|---|
Table recalculates when you change the base above.
More PAYATE tools
Frequently asked questions
What is the difference between px, rem and em?
px is an absolute pixel unit. rem is relative to the root element font-size (the <html> element), so 1rem equals your base size. em is relative to the font-size of the current element itself. Because rem always references one fixed root, it is the most predictable unit for consistent, scalable layouts.
How do I convert px to rem?
Divide the pixel value by the root font-size. With the usual 16px base, 24px / 16 = 1.5rem. To go the other way, multiply: 1.5rem × 16 = 24px. This converter does both directions live as you type.
Why is the default base 16px?
Browsers apply a default root font-size of 16px unless a stylesheet changes it, so 1rem = 16px out of the box. You can change the base field above if your site sets a different root size (for example 62.5%, which makes 1rem = 10px).
Should I use rem or px for font sizes?
Prefer rem for font sizes and spacing. Because everything scales from one root value, a single change to the root size resizes the whole page, and it respects the font-size a user sets in their browser for accessibility. Reserve px for details that must not scale, such as hairline borders.
Is my data sent anywhere?
No. All conversions run entirely in your browser using plain arithmetic — nothing is uploaded to a server and nothing is stored.
What happens with decimals or empty values?
Decimals are fully supported — type 13.5px or 0.875rem and the other field updates instantly. An empty field simply clears the result, and zero or negative numbers are handled without errors so you can experiment freely.