Pixel to REM Converter

Convert between px, rem, em, %, and pt with a customizable root font size. 100% client-side — works offline.

px
Default browser value: 16px
pixels
root em
parent em
percent
points
16px=1rem=1%(root = 16px)
Generated CSS
/* 16px = 1rem (root: 16px) */
.element {
  font-size: 1rem;
}

📊 Reference Table (root = 16px)

Pixels (px)REMEMPercent (%)
4px0.25rem0.25em25%
8px0.5rem0.5em5%
10px0.625rem0.625em62.5%
12px0.75rem0.75em75%
14px0.875rem0.875em87.5%
16px1rem1em1%
18px1.125rem1.125em112.5%
20px1.25rem1.25em125%
24px1.5rem1.5em15%
28px1.75rem1.75em175%
32px2rem2em2%
36px2.25rem2.25em225%
40px2.5rem2.5em25%
48px3rem3em3%
56px3.5rem3.5em35%
64px4rem4em4%
72px4.5rem4.5em45%
80px5rem5em5%
96px6rem6em6%
128px8rem8em8%
🔒 100% private: All conversions happen in your browser. Works offline after first load.

About Pixel to REM Converter

REM ("root em") and EM are relative CSS units that scale with the user's font size — making them essential for accessible, responsive design. PX is an absolute unit and does not scale. As a rule, use rem for font sizes, spacing, and layout (accessibility + responsiveness) and px only for things that must not scale (like borders or shadows). This tool converts between px, rem, em, %, and pt using a customizable root font size (usually 16px, the browser default). It also provides a quick-reference table of common pixel values. All conversion happens in your browser.

How It Works

  1. Enter a value in any unit field (px, rem, em, %, pt).
  2. Set your root font size (default is 16px — the browser default).
  3. All other unit fields update automatically.
  4. Use the conversion table below for common values.

✨ Key Features

  • ✓Convert between px, rem, em, %, pt, and cm/mm/in
  • ✓Customizable root font size
  • ✓Live conversion as you type
  • ✓Quick-reference table for common pixel values
  • ✓Copy any value with one click
  • ✓Handles decimals and precision
  • ✓100% client-side — no data sent to any server
  • ✓Works offline after first load
  • ✓Modern accessible design (WCAG contrast)
  • ✓No signup, no ads, no limits

🎯 Common Use Cases

  • →Converting design specs (in px) to rem for CSS
  • →Building accessible font-size scales
  • →Migrating legacy CSS from px to rem
  • →Calculating responsive spacing values
  • →Converting Figma/Sketch designs to code
  • →Debugging font-size inheritance issues
  • →Setting up a design system with rem tokens
  • →Teaching CSS units to students

💡 Advanced Tips & Pro Insights

  • ▸The default root font size is 16px in every modern browser. This matches the "medium" font size in browser settings.
  • ▸REM is relative to the ROOT element (html) font size. EM is relative to the PARENT element font size. For global scales, use rem. For component-relative sizing, use em.
  • ▸Never set html { font-size: 10px } just to make math easier — it breaks user accessibility settings (users who set 20px would still see 10px). Use rem with a 16px base, or use the CSS calc() function.
  • ▸To convert px to rem manually: rem = px / root-font-size. Example: 24px / 16px = 1.5rem.
  • ▸For 62.5% trick: html { font-size: 62.5% } makes 1rem = 10px (since 62.5% of 16px = 10px). This makes math easy but is debated for accessibility — prefer calc() or just dividing by 16.

Frequently Asked Questions

Is this px to rem converter free?▾
Yes, this pixel to REM converter is completely free with no signup, email, or usage limits.
Is my data safe?▾
Yes, 100% safe. All conversion happens in your browser. No values are sent to any server.
What is the difference between px, rem, and em?▾
px (pixel) is an absolute unit that does not scale. rem (root em) is relative to the root element (html) font size. em is relative to the parent element font size. rem and em scale with user font preferences, px does not.
Why use rem instead of px?▾
rem respects user font-size preferences — a user who needs larger text will see your design scale accordingly. px overrides user preferences, which is an accessibility problem. For content that should scale (fonts, spacing, layout), use rem.
What is the default root font size?▾
16px is the browser default for root font size (unless the user has changed it in browser settings). This tool uses 16px by default but lets you customize it.
How do I convert 24px to rem?▾
Divide by the root font size: 24px / 16px = 1.5rem. The formula is: rem = px ÷ root-font-size.
Should I use rem or em?▾
Use rem for global scales (typography, spacing, layout) because it is predictable — always relative to root. Use em when you want sizing relative to the parent element, like in components where font-size is inherited.
What about the 62.5% trick?▾
Setting html { font-size: 62.5% } makes 1rem equal to 10px, which simplifies mental math (24px = 2.4rem). But it can confuse users who set a larger browser font. Modern best practice is to keep 16px base and use calc() or rem with decimal values.