PX to REM Converter
Convert CSS units instantly for responsive design
Quick Reference Table (Base: 16px)
| Pixels (px) | REM |
|---|
Why Convert PX to REM?
In modern web development, using REM (Root EM) units instead of fixed PX (Pixels) is a best practice for Accessibility and Responsive Design.
When you define font sizes, padding, or margins in PX, they are fixed. If a user changes their browser's default font size (for visual impairment), your site won't scale. By using REM, your layout respects the user's settings.
How the Calculation Works
The formula is simple but tedious to do mentally repeatedly:
Target PX / Base Font Size = REM Value
By default, most browsers set the root HTML font size to 16px. So, 16px = 1rem, 24px = 1.5rem, and so on. However, some frameworks (like Tailwind CSS) or reset sheets might change this base to 10px or 14px. The GungorKaya.com PX to REM Converter lets you adjust this "Base Size" to match your project perfectly.
Why Use This Tool?
- Bidirectional: Type in Pixels to get REM, or type in REM to get Pixels.
- Custom Base: Working on a project with a 62.5% (10px) base? No problem. Just change the base setting.
- Reference Table: Quickly look up common sizes (12px, 14px, 16px, etc.) without typing anything.
Frequently Asked Questions
What is the formula for PX to REM?
Pixels / Base Size = REM. For a standard 16px base, 32px would be 32 / 16 = 2rem.