Guides हि
Bramhify Pro

Unlock advanced tools, unlimited usage, and priority support.

Upgrade Now
Article · (Updated: Nov 18, 2026) · 6 min read

PX to REM Conversion Table & Fluid CSS Typography Guide

Every Figma handoff arrives measured in pixels (14px body, 24px subheadings, 40px hero titles), yet shipping hardcoded font-size: 16px across your stylesheet quietly breaks browser accessibility for millions of users who bump their OS or browser default font size to 20px or 24px for readability.

Switching typography and spacing to rem (Root EM) guarantees your entire layout scales proportionally with user preferences—without manual division headaches.

Bramhify's 100% offline PX to REM Converter offers instant bidirectional math, live formula display (24px ÷ 16px = 1.5rem), 1-click Copy CSS (font-size: 1.5rem;), preset root bases (16px Default, 10px / 62.5%, 14px, or custom), and a clickable quick-reference grid right in your browser.

Complete PX to REM Conversion Table (16px Default vs. 62.5% Trick)

Bookmark this table matching Figma pixel specs directly to Tailwind CSS / Standard 16px Root and 10px (62.5%) Root projects:

Pixels (px)REM (16px Base — Default)REM (10px / 62.5% Base)Tailwind CSS ClassCommon UI Role
12px0.75rem1.2remtext-xsCaptions, badges, footnotes
14px0.875rem1.4remtext-smSecondary UI copy, inputs, buttons
16px1rem1.6remtext-baseStandard accessible body copy
18px1.125rem1.8remtext-lgLead paragraphs, card titles
20px1.25rem2.0remtext-xlSection subheadings (H3)
24px1.5rem2.4remtext-2xlMajor headings (H2 — WCAG Large Text)
30px1.875rem3.0remtext-3xlPage titles
36px2.25rem3.6remtext-4xlHero titles (H1 mobile)
48px3rem4.8remtext-5xlHero titles (H1 desktop)

Convert PX ↔ REM with Custom Base Presets Locally:

Bramhify PX to REM Converter with live formula bar, root base presets, and clickable cheat sheet grid Bramhify PX to REM Converter with live formula bar, root base presets, and clickable cheat sheet grid
Bidirectional PX ↔ REM calculation with live math breakdown, copyable CSS rule, and 16px/10px/custom base presets.
PX to REM Converter Icon
PX to REM Converter Bidirectional · 16px / 62.5% · 1-Click CSS Copy

rem vs. em vs. px: When to Use Each CSS Unit

  1. Use rem for Font Sizes, Gaps, Padding & Media Queries: rem always multiplies the root <html> font size—never compounding unpredictably inside nested lists or cards. Even better, media queries written in rem (@media (min-width: 48rem)) adapt automatically when a user zooms their default browser font size!
  2. Use em for Component-Relative Padding & Icons: Setting padding: 0.5em 1em on a button or width: 1em; height: 1em on an inline SVG icon means a .btn-lg (font-size: 1.25rem) automatically scales its padding and icon proportionally without extra rules.
  3. Keep px Only for Hairline Borders & Subtle Shadows: border: 1px solid and outline-offset: 2px should stay crisp at 1px–2px instead of blurring into fractional subpixels when scaled.

Should You Still Use the html { font-size: 62.5%; } Trick in 2026?

Setting html { font-size: 62.5%; } shrinks the root base from 16px down to 10px (16 × 0.625 = 10) so 24px becomes an easy mental 2.4rem while still respecting user browser zoom (unlike setting hardcoded html { font-size: 10px; }, which breaks accessibility!).

Modern Verdict:

  • Avoid 62.5% if you use Tailwind CSS, Shadcn/UI, Bootstrap, or third-party component libraries—they all assume a 16px root and will shrink to 62.5% miniature size!
  • Stick to default 16px root (1rem = 16px) and lean on Bramhify's PX to REM Converter or CSS custom properties (--text-lg: 1.125rem;).

Fluid Responsive Typography with clamp() (Zero Breakpoint Jumps)

Instead of writing three media queries to shrink an H1 from desktop to mobile, combine rem with vw inside CSS clamp(min, preferred, max):

/* Scales smoothly from 1.75rem (28px) on mobile to 3rem (48px) on desktop */
h1 {
  font-size: clamp(1.75rem, 1.2rem + 2.5vw, 3rem);
  line-height: 1.15;
}

Accessibility Rule (WCAG 1.4.4): Always include a rem component (1.2rem + 2.5vw) inside the middle clamp() argument—never pure 5vw alone—so users can still zoom text to 200% cleanly using Ctrl +!

Frequently Asked Questions (FAQs)

Why do accessibility experts recommend rem over px for font-size?

Hardcoded px font sizes ignore a user's browser-level default font size setting (common among low-vision users who change Chrome/Firefox from 16px to 24px). Using rem respects that root preference automatically so every heading, paragraph, and layout rhythm scales harmoniously.

How do I convert pixels to rem manually?

Divide the pixel value by the root <html> font size (almost always 16px): rem = px ÷ 16. For example, 20px ÷ 16 = 1.25rem, and 14px ÷ 16 = 0.875rem.

Does html { font-size: 10px; } break accessibility?

Yes! Hardcoding 10px on <html> overrides the user's custom browser font size completely. If you want a 10px base for mental math, you must use a percentage (html { font-size: 62.5%; }) and immediately restore body { font-size: 1.6rem; }.

What is the difference between em and rem?

rem ("root em") is always relative to the root <html> element (16px), so 1.5rem means 24px everywhere on the page. em is relative to the parent element's font size—which can accidentally compound (1.2em inside 1.2em becomes 1.44×) in nested lists or cards.

Building a complete accessible CSS token system?

Pair this calculator with our WCAG Color Contrast Cheat Sheet and Modern Glassmorphism & CSS Box Shadow Recipes.

Try it yourself

Convert pixels to scalable REM/EM units.

Open PX to REM Converter →