PX to REM Converter (CSS Typography)
Convert CSS pixels (px) to accessible rem and em units—or reverse-convert rem to px—using the standard 16px browser root font-size or your project's custom base size.
Universal Unit, Pixel/DPI & CSS Converter
14 measurement categories • Bi-directional editing • Live multi-unit matrix
16 px = 1 rem
Formula: 1 px = 0.0625 rem • 1 rem = 16 px
Standard Print & ID Sizes in Pixels @ 96 DPI
Click any dimension to copyAll Pixels, Print DPI & CSS Typography Units at a Glance (16 px)
Click any card to set as “To” unit16 px
1 rem
1 em
12 pt
1 pc
0.1666666667 in
4.233333333 mm
0.4233333333 cm
240 twip
How to Convert PX to REM in CSS
In CSS, 1rem equals the computed font-size of the root <html> element. Across all modern web browsers, the default root font-size is 16px. To convert any pixel value to rem, divide the pixel value by the root font-size.
rem = px ÷ Root Font Size (16)px = rem × Root Font Size (16)24 px ÷ 16 = 1.5 remCSS PX to REM & Tailwind Spacing Cheat Sheet (Base 16px)
Quick reference table for frontend developers mapping design-file pixels (Figma / Sketch) to CSS rem units and Tailwind utility classes.
| Pixels (px) | CSS REM (Base 16px) | Common CSS / Tailwind Equivalent |
|---|---|---|
| 4 px | 0.25 rem | spacing-1 (p-1 / gap-1) |
| 8 px | 0.5 rem | spacing-2 (p-2 / gap-2) |
| 12 px | 0.75 rem | text-xs (12px font / p-3) |
| 14 px | 0.875 rem | text-sm (Secondary UI body text) |
| 16 px | 1 rem | text-base (Browser default body font) |
| 18 px | 1.125 rem | text-lg (Lead paragraph font) |
| 20 px | 1.25 rem | text-xl (Card subheading) |
| 24 px | 1.5 rem | text-2xl (Section heading) |
| 32 px | 2 rem | text-3xl / spacing-8 (2rem) |
| 48 px | 3 rem | text-5xl (Hero display heading) |
| 64 px | 4 rem | text-6xl / spacing-16 (4rem) |
How to Convert Figma Pixels to CSS REM Units
Confirm Your Root Font Size
Leave the CSS Root Font Size at 16px (standard for Tailwind, Bootstrap, and browser defaults) or change it to 10px / 14px if your <html> tag overrides it.
Enter PX or REM Value
Type your Figma pixel value into the From (px) field, or type a rem token into the To (rem) field to see its exact pixel equivalent.
Copy for Your Stylesheet
Check "Copy with unit (rem)" to copy ready-to-paste CSS values like 1.125rem or 2.25rem directly into your CSS or Tailwind config.
Why WCAG Accessibility Requires REM Instead of Hardcoded PX
When you hardcode font sizes in pixels (such as font-size: 14px), users with low vision who change their browser’s default font size from 16px to 20px or 24px in Chrome, Safari, or Firefox settings are locked out of scaling your text. Hardcoded pixel typography ignores user preference stylesheets and fails WCAG 2.1 SC 1.4.4 (Resize Text) best practices.
By defining font-size, line-height, and container max-widths in rem units, your entire typographic hierarchy scales proportionally whenever a user adjusts their operating system or browser base font size.
Frequently Asked Questions
What is 16px in rem?
At the standard browser root font size of 16px, 16px is exactly 1rem. Similarly, 8px is 0.5rem, 12px is 0.75rem, 14px is 0.875rem, 18px is 1.125rem, 24px is 1.5rem, and 32px is 2rem.
What is the difference between rem and em in CSS?
rem ("root em") is always calculated relative to the root <html> element’s font-size, so 1.5rem is the same size everywhere on the page. em is calculated relative to the font-size of the element’s immediate parent, which can compound unpredictably when nesting lists or components.
What if my project uses the 62.5% (10px) root font-size trick?
If your stylesheet sets html { font-size: 62.5%; }, then 1rem equals 10px instead of 16px. Simply change the "CSS Root Font Size (1rem)" box above from 16 to 10, and the converter will divide all pixel values by 10 (e.g., 16px = 1.6rem, 24px = 2.4rem).
Should I use rem or px for borders and media queries?
Use rem for font-size, padding, margin, and readable content container widths (like max-width: 48rem). Hairline 1px borders and shadows are best kept in px so they stay crisp on 1x and 2x displays.
More Dedicated Unit & Print Calculators
All 14 Measurement CategoriesRelated Frontend Developer & Design Tools
Continue your workflow with 100% browser-local tools—no sign-up, no watermarks, and zero server uploads.
SVG Optimizer & React JSX
DevMinify SVG icons from Figma and convert them into clean React JSX components.
Color Palette & WCAG Contrast
DesignExtract HEX/RGB/HSL tokens, CSS variables, and WCAG AA/AAA contrast scores.
Base64 Image & Data URI
CSS URIEncode icons into inline CSS background-image Data URIs or HTML img tags.
Favicon & App Icon Generator
Web AppGenerate favicon.ico, Apple Touch icons, and site.webmanifest in one click.