1 CSS pixel = 0.0625 rem
Dividing by the root font size is the core of accessible CSS sizing: a layout in rem scales when a user raises their browser text size, while one in px does not. The default root is 16 px, and this converter lets you set your own.
Formula rem = px × 0.0625
Type in either field — the other updates on every keystroke. Need other units? Open the full pixels converter.
| CSS pixel | Root em |
|---|---|
| 1 px | 0.0625 rem |
| 2 px | 0.125 rem |
| 3 px | 0.1875 rem |
| 4 px | 0.25 rem |
| 5 px | 0.3125 rem |
| 10 px | 0.625 rem |
| 15 px | 0.9375 rem |
| 20 px | 1.25 rem |
| 25 px | 1.5625 rem |
| 50 px | 3.125 rem |
| 100 px | 6.25 rem |
| 500 px | 31.25 rem |
| 1000 px | 62.5 rem |
| Root em | CSS pixel |
|---|---|
| 1 rem | 16 px |
| 2 rem | 32 px |
| 3 rem | 48 px |
| 4 rem | 64 px |
| 5 rem | 80 px |
| 10 rem | 160 px |
| 15 rem | 240 px |
| 20 rem | 320 px |
| 25 rem | 400 px |
| 50 rem | 800 px |
| 100 rem | 1600 px |
| 500 rem | 8000 px |
| 1000 rem | 16000 px |
| Situation | From | To |
|---|---|---|
| Small caption text | 12 px | 0.75 rem |
| Small text | 14 px | 0.875 rem |
| Default body text | 16 px | 1 rem |
| Large body text | 18 px | 1.125 rem |
| Subheading | 24 px | 1.5 rem |
| Page heading | 32 px | 2 rem |
Designers specify sizes in pixels, but accessibility guidance favours rem, which scales with the user's font-size setting.
Browsers set the root font size to 16 px by default, so 16 px is 1 rem, 14 px is 0.875 rem, 18 px is 1.125 rem, 24 px is 1.5 rem and 32 px is 2 rem. Designers hand over sizes in pixels and developers write them in rem so text scales with the user's own font settings, which matters for accessibility.
Some stylesheets set the root size to 62.5 percent, which makes 1 rem equal 10 px and turns the maths into moving a decimal point. If a project does that, change the root font size in the converter above and every result on this page follows it. Use rem for text and spacing that should scale, and px for hairline borders and fixed-size icons.
Divide by 16. For 24 px: 24 ÷ 16 = 1.5 rem.
Fixed px font sizes ignore user preferences.
The CSS pixel is a reference unit defined as 1/96 inch, not a hardware pixel. The rem unit (root em) arrived with CSS3 to avoid the compounding that em units suffer in nested elements.
No purchase is needed here. The most accurate tools are free ones built into your browser and design software, and they show rem values from the real stylesheet instead of a calculation.
| Tool | What to look for | Why it matters |
|---|---|---|
| Browser developer tools | Computed styles pane shows the final pixel size, and you can edit values live | Confirms what a rem value resolves to on a real page |
| Design tools such as Figma | Can display sizes in px and set a base font size | Keeps designer and developer on one unit |
| A CSS custom property for the base size | One variable used across the stylesheet | Changing the root size updates every rem value together |
Quick accuracy check. Open developer tools, select the html element and check the computed font-size. That is the number to use as 1 rem in your conversion.
Examples: Chrome DevTools, Firefox Developer Tools and Safari Web Inspector are free and ship with the browser. Product names are examples of established brands, not rankings or paid placements. Specifications and prices change, so check current independent reviews before you buy.
Related guides: Digital and print layout units: px, rem, em, points and DPI · Unit conversion formulas by category · Where unit conversions come up in daily life