100% FREE • NO SIGNUP

PX to REM Converter

Convert pixels to rem and rem to px instantly. Customizable base font size, bulk converter, conversion table, and ready-to-copy CSS output.

px

Pixels (px)

px

REM

rem

CSS Output

font-size: 1rem; /* 16px */

Quick Reference Table (click to copy)

PixelsREMPointsUse Case

Bulk Converter

Enter multiple px values (one per line or comma-separated)

Results will appear here...

How PX to REM Conversion Works

The rem unit in CSS stands for "root em." It's relative to the font size of the root element (<html>). By default, browsers set this to 16px, so 1rem = 16px.

The Formula

rem = px ÷ base font size

For example, with a 16px base: 24px ÷ 16 = 1.5rem

Why Use REM?

When to Use PX vs REM

Use REM forUse PX for
Font sizesBorders
Margins & paddingBox shadows
Line heightsFine details (1px lines)
Max-width containersMedia queries
Gap & spacingOutline widths

Responsive Scaling with REM

Set different base sizes at breakpoints to scale your entire design:

html { font-size: 16px; }

@media (max-width: 768px) {
  html { font-size: 14px; }
}

@media (min-width: 1440px) {
  html { font-size: 18px; }
}

Common Conversions (Base 16px)

10px = 0.625rem · 12px = 0.75rem · 14px = 0.875rem · 16px = 1rem · 18px = 1.125rem · 20px = 1.25rem · 24px = 1.5rem · 32px = 2rem · 48px = 3rem · 64px = 4rem

Frequently Asked Questions

How do I convert px to rem?▾
Divide the pixel value by the root font size (usually 16px). For example, 24px ÷ 16 = 1.5rem. Our converter does this instantly and supports custom base sizes from 10 to 20px.
What is the default base font size?▾
All major browsers default to 16px as the root font size. This means 1rem = 16px unless you override it with html { font-size: ... } in your CSS.
Why should I use rem instead of px?▾
REM units respect the user's browser font size preference, making your site more accessible. They also make responsive design easier — change the root font size at breakpoints and everything scales proportionally.
What's the difference between em and rem?▾
REM always references the root element's font size, while em references the parent element's font size. This makes rem more predictable since nested em values compound (1.2em inside 1.2em = 1.44× the root size).
Should I use rem for media queries?▾
It's debated. Using em or rem in media queries makes them respond to user font-size changes, which is great for accessibility. However, px gives you exact pixel breakpoints. Both approaches are valid in modern CSS.

🛠️ Need More Dev Tools?

Check out our 60+ free developer tools — all run in your browser, no signup needed.

Browse All Tools →

Related Tools