Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

REM to Pixel Calculator

Convert rem units to pixel values based on your root font size, with batch conversion and CSS output

Your files never leave your browser
px
REM Values (one per line)
Pixel Results

Quick Reference

REMPixels
CSS Input (with rem)
CSS Output (with px)
Ready·Root: 16px

Punch in any rem value and get the pixel equivalent instantly — one at a time, in bulk, or across an entire CSS file. Set a custom root font size if your project doesn't stick with the 16px browser default. And everything runs in your browser. Nothing gets uploaded.

How It Works

Enter REM Value
➔
Multiply by Root Size
➔
Get Pixel Value

The formula is dead simple: pixels = rem × root font size. Browsers default the root (<html>) font size to 16px, so 1rem = 16px. If your project sets the root to something like 10px or 18px, just change the base size here and every conversion updates on the spot. Batch mode splits your input line by line, and CSS mode finds every rem value inside your stylesheet using a regex, then swaps each one to its pixel equivalent.

Examples

Quick single conversion

You spot margin-bottom: 2.5rem in a code review and need to know the pixel size.

INPUT
2.5rem (root: 16px)
OUTPUT
40px

Batch converting a spacing scale

Your design system defines spacing tokens in rem. You need every value in pixels for a handoff document going to a developer who thinks in px.

INPUT
0.25rem 0.5rem 0.75rem 1rem 1.5rem 2rem 3rem
OUTPUT
0.25rem = 4px 0.5rem = 8px 0.75rem = 12px 1rem = 16px 1.5rem = 24px 2rem = 32px 3rem = 48px

Converting an entire CSS block with a non-default root

Your project uses html { font-size: 10px; } for easier math, and you want to convert a component's CSS to hard pixel values before handing it to a third-party embed that doesn't share your root.

INPUT
.card { padding: 1.6rem 2.4rem; font-size: 1.4rem; border-radius: 0.8rem; margin-bottom: 3.2rem; } (root: 10px)
OUTPUT
.card { padding: 16px 24px; font-size: 14px; border-radius: 8px; margin-bottom: 32px; }

Who Uses This

👨‍💻 Front-End Developers

Checking pixel output when debugging layout or tweaking spacing in DevTools.

🎨 UI Designers

Translating rem-based specs into pixel values for Figma or Sketch mockups.

📚 Students

Learning CSS units and building intuition for how rem maps to actual screen size.

✅ QA Engineers

Verifying computed sizes match the spec during visual regression testing.

Common Mistakes

Forgetting to change the root font size

If your project sets html { font-size: 62.5%; } (which equals 10px), but you leave this tool at the default 16px, every result will be 60% too large. Always match the root size to what your CSS actually declares.

Confusing rem with em

Rem is relative to the root element. Em is relative to the parent. A 2em inside a container with font-size: 20px equals 40px — but 2rem still equals 32px (at 16px root). This tool only handles rem, not em.

Pasting values with extra whitespace or units

Batch mode expects one value per line. Stuff like padding: 1.5rem won't parse — strip it down to just 1.5 or 1.5rem. For full CSS properties, use the CSS mode instead.

Technical Details

Frequently Asked Questions

What is 1rem in pixels?

With the browser default root font size of 16px, 1rem equals 16px. That's the standard across Chrome, Firefox, Safari, and Edge. If your stylesheet sets a different root size — like html { font-size: 10px; } — then 1rem equals whatever you set it to.

How do I convert rem to px manually?

Multiply the rem number by your root font size. So 2.5rem at the default 16px root = 2.5 × 16 = 40px. That's it. The tricky part is remembering what root size your project actually uses, since some codebases set it to 10px or 62.5% for easier mental math.

Why should I use rem instead of px in CSS?

Accessibility is the big one. When a user bumps up their browser's default font size, rem-based layouts scale with it. Pixel values don't budge. Rem also makes responsive design simpler — change the root font size at a media query breakpoint and everything adjusts proportionally.

What is the difference between rem and em?

Rem always refers to the root element's font size. Em refers to the font size of the nearest parent. That distinction matters when you nest elements — em compounds (a 2em inside another 2em becomes 4× the grandparent), while rem stays fixed. Most teams prefer rem for consistency.

Can I convert an entire CSS file from rem to px?

Yes. Switch to CSS mode, paste your full stylesheet, and every rem value gets replaced with its pixel equivalent instantly. It handles shorthand properties like margin: 1rem 2rem too. Just make sure the root size is set correctly before you paste.

Share: