PX to REM Converter

Free PX to REM converter. Convert pixels to rem (and rem to px) with any base font size. Get equivalent values in em, percent, and points. Paste CSS code to bulk-convert all px values to rem instantly.

px
px

Paste CSS code to convert all px values to rem

REM Value

1rem

16px / 16px = 1rem

Live Preview

Visual comparison of your converted value vs base size

16px

The quick brown fox

16px

The quick brown fox (base)

Conversion Table

Common pixel values and their equivalents at 16px base

PixelsREMEM%Points
1px0.0625rem0.0625em6.25%0.75pt
2px0.125rem0.125em12.5%1.5pt
3px0.1875rem0.1875em18.75%2.25pt
4px0.25rem0.25em25%3pt
5px0.3125rem0.3125em31.25%3.75pt
6px0.375rem0.375em37.5%4.5pt
7px0.4375rem0.4375em43.75%5.25pt
8px0.5rem0.5em50%6pt
9px0.5625rem0.5625em56.25%6.75pt
10px0.625rem0.625em62.5%7.5pt
11px0.6875rem0.6875em68.75%8.25pt
12px0.75rem0.75em75%9pt
13px0.8125rem0.8125em81.25%9.75pt
14px0.875rem0.875em87.5%10.5pt
15px0.9375rem0.9375em93.75%11.25pt
16px1rem1em100%12pt
18px1.125rem1.125em112.5%13.5pt
20px1.25rem1.25em125%15pt
22px1.375rem1.375em137.5%16.5pt
24px1.5rem1.5em150%18pt
26px1.625rem1.625em162.5%19.5pt
28px1.75rem1.75em175%21pt
30px1.875rem1.875em187.5%22.5pt
32px2rem2em200%24pt
36px2.25rem2.25em225%27pt
40px2.5rem2.5em250%30pt
44px2.75rem2.75em275%33pt
48px3rem3em300%36pt
56px3.5rem3.5em350%42pt
64px4rem4em400%48pt
72px4.5rem4.5em450%54pt
80px5rem5em500%60pt
96px6rem6em600%72pt

What Are PX and REM Units?

Understanding the two most important CSS length units

Pixels (px) are absolute CSS units. 1px is always the same size regardless of context. They give precise control but don't scale with user preferences.

REM (root em) is a relative unit based on the root element's font size. By default, browsers set the root font size to 16px, so 1rem = 16px. When users change their browser font size, rem-based layouts scale automatically.

Conversion Formulas

px / base

PX to REM

24px / 16 = 1.5rem

rem * base

REM to PX

1.5rem * 16 = 24px

Worked example

A designer hands you a mockup with 24px heading and 14px body text. With a 16px base: heading = 24 / 16 = 1.5rem, body = 14 / 16 = 0.875rem. If the user increases their browser font size to 20px, the heading becomes 30px and body becomes 17.5px — maintaining the same proportions.

REM vs EM vs PX: When to Use Each

Choosing the right CSS unit for every property

px — Absolute Pixels

Fixed size regardless of context. Best for borders, box shadows, outline widths, and fine visual details where scaling would look wrong. A 1px border should stay 1px at any zoom level.

rem — Root-Relative

Always relative to the root html font size — consistent across the entire document. Use for font sizes, margins, padding, max-widths, and media queries. Scales with user accessibility settings.

em — Parent-Relative

Relative to the parent element's font size. Can compound (nest 1.2em inside 1.2em = 1.44×). Best for component-internal spacing that should scale with the component's own font size, like button padding.

% — Percentage

Relative to the parent element's size. Use for fluid widths, responsive containers, and layouts that should fill a proportion of their parent. Common in grid and flexbox patterns.

Rule of thumb: use rem for everything that should scale with accessibility settings, px for everything that shouldn't.

How to Use This PX to REM Converter

Step-by-step for single values, custom bases, and bulk CSS conversion

1
Choose Conversion Direction

Select "PX to REM" to convert pixels into rem, or "REM to PX" to go the other way. The tabs switch the input and output units instantly.

2
Enter Your Value

Type the pixel or rem value you want to convert. The result updates in real time — no need to press a button.

3
Set Your Base Font Size

If your project uses html { font-size: 62.5% } (10px) or any non-standard root size, adjust the base. The default is 16px, which matches all browsers.

4
Copy or Bulk Convert

Tap or click any output card (REM, EM, %, or PT) to copy the value to your clipboard. For entire stylesheets, paste your CSS code into the Bulk Converter — all px values are replaced with rem automatically.

Common Mistakes When Using REM

Pitfalls to avoid when working with relative CSS units

Assuming 1rem = 16px always

Reality: Check your CSS for html { font-size: ... }. If the root font size is changed (e.g., to 62.5% = 10px), all rem calculations shift. Always match this converter's base to your project's actual root.

Confusing rem and em

Reality: REM is always relative to the root element. EM is relative to the parent element and compounds — nesting 1.2em inside 1.2em gives 1.44× the grandparent size. Use rem for consistency.

Using px for font sizes

Reality: Pixel font sizes ignore user browser settings for accessibility. WCAG 2.1 guideline 1.4.4 requires text to be resizable up to 200%. Use rem for all font sizes.

Using rem for borders and shadows

Reality: Borders and box shadows are visual decorations where exact pixel precision matters. A 1px border should stay 1px regardless of font size. Use px for these fine details.

Frequently Asked Questions

Common questions about PX to REM conversion, base font sizes, and CSS units