REM to PX Converter
Convert rem to px and px to rem with custom root font sizes, quick reference conversion tables, and Tailwind CSS spacing cheatsheets.
16.00px
1.0000rem
0.75rem
12.00px
0.875rem
14.00px
1rem
16.00px
1.125rem
18.00px
1.25rem
20.00px
1.5rem
24.00px
2rem
32.00px
3rem
48.00px
REM to PX Conversion Table (16px Base)
Quick reference table mapping standard REM values to exact pixels with typical CSS design system use cases.
| REM Value | Pixels (PX) | Common Design & UI Use Case |
|---|---|---|
| 0.25 rem | 4 px | Subtle borders, micro badges, icon padding (p-1) |
| 0.5 rem | 8 px | Compact button padding, form input spacing (p-2) |
| 0.625 rem | 10 px | Micro copy, legal disclaimers, 62.5% root base |
| 0.75 rem | 12 px | Tailwind text-xs, captions, metadata tags (p-3) |
| 0.875 rem | 14 px | Tailwind text-sm, secondary body copy, table cells (p-3.5) |
| 1 rem | 16 px | Default browser body font, standard paragraph text (p-4) |
| 1.125 rem | 18 px | Tailwind text-lg, lead paragraphs, card titles (p-4.5) |
| 1.25 rem | 20 px | Tailwind text-xl, H4 headlines, button heights (p-5) |
| 1.5 rem | 24 px | Tailwind text-2xl, H3 subheaders, standard container padding (p-6) |
| 1.75 rem | 28 px | Large section callouts, subheadings (p-7) |
| 2 rem | 32 px | Tailwind text-3xl, H2 page section headers (p-8) |
| 2.25 rem | 36 px | Tailwind text-4xl, primary section heroes (p-9) |
| 2.5 rem | 40 px | Hero subheaders, large avatar dimensions (p-10) |
| 3 rem | 48 px | Tailwind text-5xl, H1 page titles, hero headers (p-12) |
| 3.75 rem | 60 px | Tailwind text-6xl, landing page display headlines |
| 4 rem | 64 px | Large layout gutters, hero top padding (p-16) |
| 5 rem | 80 px | Section spacing, desktop hero breaks (p-20) |
| 6 rem | 96 px | Major page layout divider spacing (p-24) |
Tailwind CSS Typography & REM Cheatsheet
Standard typography classes in Tailwind CSS v3 & v4 with exact REM equivalents, pixel values, and default line heights.
| Tailwind Class | REM Size | Pixels (16px Base) | Default Line Height |
|---|---|---|---|
| text-xs | 0.75 rem | 12 px | 1rem (16px) |
| text-sm | 0.875 rem | 14 px | 1.25rem (20px) |
| text-base | 1 rem | 16 px | 1.5rem (24px) |
| text-lg | 1.125 rem | 18 px | 1.75rem (28px) |
| text-xl | 1.25 rem | 20 px | 1.75rem (28px) |
| text-2xl | 1.5 rem | 24 px | 2rem (32px) |
| text-3xl | 1.875 rem | 30 px | 2.25rem (36px) |
| text-4xl | 2.25 rem | 36 px | 2.5rem (40px) |
| text-5xl | 3 rem | 48 px | 1 |
| text-6xl | 3.75 rem | 60 px | 1 |
| text-7xl | 4.5 rem | 72 px | 1 |
| text-8xl | 6 rem | 96 px | 1 |
| text-9xl | 8 rem | 128 px | 1 |
Why Use This REM to PX Converter?
Bidirectional Conversion
Convert rem to px or px to rem instantly with continuous synchronized recalculation.
Custom Root Baseline
Configurable root font size (16px default, 10px 62.5% scale, or custom mobile baselines).
Tailwind CSS Cheatsheet
Complete reference for Tailwind typography classes and spacing unit scales.
Responsive Typography Helper
Quickly look up accessible relative units for media queries and clamp() calculations.
Zero Layout Shift
Lightweight, client-side calculator designed for high-performance frontend developer workflows.
Copy-Ready Code
Clean CSS values ready to paste into Tailwind config, CSS modules, or Figma design tokens.
Frequently Asked Questions
What is the formula to convert REM to PX?
The formula is: PX = REM × Root Font Size. Assuming the standard browser default of 16px, 1.5rem equals 1.5 × 16 = 24px.
What is the formula to convert PX to REM?
The formula is: REM = PX ÷ Root Font Size. For example, to convert 20px with a 16px root: 20 ÷ 16 = 1.25rem.
Why do modern web developers prefer REM over PX?
REM units are relative to the root HTML element's font size. When visually impaired users adjust their browser's default font size (for example, setting the base to 20px or 24px for readability), rem-based typography scales proportionally across the entire layout. Hardcoded pixel (px) values ignore user preferences, failing WCAG 1.4.4 accessibility guidelines.
What is the CSS 62.5% trick?
By setting 'html { font-size: 62.5%; }' in your stylesheet, you change the default browser root size from 16px to 10px (16 × 0.625 = 10px). This makes mental math trivial: 1.4rem becomes exactly 14px, 1.6rem becomes 16px, and 2.4rem becomes 24px, while still respecting user browser zoom settings.
How does Tailwind CSS calculate REM spacing?
Tailwind uses a 4px (0.25rem) baseline scale based on a 16px root. For instance: p-1 = 0.25rem (4px), p-2 = 0.5rem (8px), p-4 = 1rem (16px), p-6 = 1.5rem (24px), and p-8 = 2rem (32px).
Other CSS Utilities
Need a Brain Break? ☕
Done working on your task? Take a quick 60-second break, test your reflexes, and flap through infinite pixel obstacles in Sky Flap!