PX to REM Converter — CSS Unit Calculator

Convert pixels to REM and REM to pixels with custom base font size. Quick reference table with visual preview. Free CSS unit converter.

px
=

Quick Reference (base: 16px)

PixelsREMPreview
8px0.5remAa
10px0.625remAa
12px0.75remAa
14px0.875remAa
16px1remAa
18px1.125remAa
20px1.25remAa
24px1.5remAa
28px1.75remAa
32px2remAa
36px2.25remAa
40px2.5remAa
48px3remAa
56px3.5remAa
64px4remAa
72px4.5remAa
80px5remAa
96px6remAa

How the PX to REM Converter Works

  1. Set your base font size (default: 16px, the browser standard)
  2. Enter a PX value to convert to REM, or a REM value to convert to PX
  3. See the result instantly with a visual size preview
  4. Use the quick reference table for common conversions

PX and REM Units Guide

REM stands for 'root em' and is relative to the root element's font size (html element). The default browser font size is 16px, so 1rem = 16px. Using REM units makes your layout respond to user font size preferences, which is critical for accessibility. The 62.5% technique (setting html { font-size: 62.5% }) gives you a 10px base, making mental math easier: 1.6rem = 16px, 2.4rem = 24px. However, this can confuse third-party component libraries, so the standard 16px base is recommended for most projects.

When to Use a PX to REM Converter

Use this converter when implementing designs from Figma, Sketch, or Adobe XD that specify values in pixels but your CSS codebase uses REM units. It is essential during responsive web development, accessibility audits (ensuring WCAG 1.4.4 compliance for text resizing), and when adopting CSS frameworks like Tailwind that use REM-based spacing scales.

Common Use Cases

Expert Tips

  • Stick to the standard 16px base unless your entire team agrees on a different base — mixing bases causes confusion
  • Use the reference table to memorize common conversions: 12px = 0.75rem, 14px = 0.875rem, 16px = 1rem, 24px = 1.5rem
  • For borders and box shadows, keep PX units — these decorative properties should not scale with font size

Frequently Asked Questions

What is the default base font size?
The default browser base font size is 16px, which means 1rem = 16px. You can change this in the tool to match your project's root font size.
Why should I use REM instead of PX?
REM units scale with the user's browser font size preference, improving accessibility. Users who set a larger default font (common for low vision) will see your layout scale proportionally.
What is the 62.5% technique?
Setting html { font-size: 62.5% } changes the base to 10px, making conversions easier: 1.6rem = 16px, 2rem = 20px. Use this tool with a base of 10 if your project uses this approach.
Should I use REM for everything?
Use REM for font sizes, spacing, and most layout dimensions. Use PX for borders, box shadows, and other decorative properties that should not scale with font size.
Does this work for EM units too?
EM units are relative to the parent element's font size, not the root. This tool converts PX to REM (root-relative). For EM conversions, you need to know the parent's computed font size.

Related Tools