PX to REM Converter
Convert between px and rem instantly, based on the root font size.
Common values
Click a value to copy it in rem.
Batch CSS converter
Paste CSS and every value converts instantly. @media conditions are left untouched.
Calculate in SCSS
A function with your root font size baked in.
PX to REM conversion table (16px base)
Values for the browser default root font size of 16px. Formula: rem = px ÷ 16
| px | rem |
|---|---|
| 1px | 0.0625rem |
| 2px | 0.125rem |
| 4px | 0.25rem |
| 6px | 0.375rem |
| 8px | 0.5rem |
| 10px | 0.625rem |
| 11px | 0.6875rem |
| 12px | 0.75rem |
| 13px | 0.8125rem |
| 14px | 0.875rem |
| 15px | 0.9375rem |
| px | rem |
|---|---|
| 16px | 1rem |
| 17px | 1.0625rem |
| 18px | 1.125rem |
| 19px | 1.1875rem |
| 20px | 1.25rem |
| 21px | 1.3125rem |
| 22px | 1.375rem |
| 24px | 1.5rem |
| 26px | 1.625rem |
| 28px | 1.75rem |
| 30px | 1.875rem |
| px | rem |
|---|---|
| 32px | 2rem |
| 36px | 2.25rem |
| 40px | 2.5rem |
| 44px | 2.75rem |
| 48px | 3rem |
| 56px | 3.5rem |
| 60px | 3.75rem |
| 64px | 4rem |
| 72px | 4.5rem |
| 80px | 5rem |
| 96px | 6rem |
REM to PX conversion table (16px base)
| rem | px |
|---|---|
| 0.125rem | 2px |
| 0.25rem | 4px |
| 0.375rem | 6px |
| 0.5rem | 8px |
| 0.625rem | 10px |
| 0.75rem | 12px |
| 0.875rem | 14px |
| rem | px |
|---|---|
| 1rem | 16px |
| 1.125rem | 18px |
| 1.25rem | 20px |
| 1.5rem | 24px |
| 1.75rem | 28px |
| 2rem | 32px |
| 2.25rem | 36px |
| rem | px |
|---|---|
| 2.5rem | 40px |
| 3rem | 48px |
| 3.5rem | 56px |
| 4rem | 64px |
| 5rem | 80px |
| 6rem | 96px |
Projects that set html { font-size: 62.5% } have 1rem = 10px, so just divide by 10 (16px = 1.6rem). Set the root font size above to 10 to convert on that basis.
PX to REM Conversion Guide: Where Accessibility Starts
The PX to REM converter is the tool most often recommended to developers who want to build accessible websites. While pixels describe a fixed physical size on screen, REM is a "smart" unit that responds to the user's environment and browser settings.
1. What is the REM (Root EM) unit?
REM is a relative unit based on the font size set on the document's root <html> element. The browser default is usually 16px, which makes 1rem = 16px. If a user with low vision raises their browser's default font size, everything sized in rem scales proportionally — and that is the single biggest reason to prefer REM over PX.
2. REM vs EM: the decisive difference
- REM (Root EM): always references the html element's font size. It stays consistent wherever you use it, which keeps the math simple.
- EM: references the parent element's font size. In nested structures, sizes can compound unexpectedly, so it needs more care.
3. Why should you use REM?
The main reason is accessibility. With fixed px sizes, users who adjust their preferred font size see no change, which can make your site hard to read. REM respects the user's browser preference while preserving your design's proportions. It is also the foundation of modern fluid typography techniques.
4. How to use this tool
Enter your base font size in the Root Font Size field (default 16px), then type any px value from your design to get the rem equivalent instantly. Many teams use the html { font-size: 62.5%; } trick to make 1rem equal 10px — set the root to 10 in this tool and the conversions will match that setup exactly. The batch converter converts every px value in a pasted CSS file at once.
Frequently Asked Questions
Q. How many pixels is 1rem?
1rem equals the font size of the html root element. The browser default is 16px, so unless you change it, 1rem = 16px.
Q. What is the formula to convert px to rem?
rem = px value ÷ root font size. With a 16px root, 24px equals 24 ÷ 16 = 1.5rem.
Q. What is the html font-size: 62.5% trick?
Setting font-size: 62.5% on the html element makes 1rem equal 10px, so 1.6rem = 16px and the math becomes base-10. Set the root font size to 10 in this tool to match that setup.
Q. Why use rem instead of px?
When users increase their browser's default font size, everything sized in rem scales with it. Sizes fixed in px ignore the user's font settings, which hurts accessibility.