PX to REM Converter
Convert px and rem values for CSS instantly. Change the root font size to update the conversion and reference chart.
This tool has been used … times.
Convert px and rem
px
pxCSS px value
remCSS rem value
Common size reference
Select a px value to load it into the converter above.
| px | rem | Typical use |
|---|---|---|
| 0.5rem | Small spacing | |
| 0.625rem | Fine print | |
| 0.75rem | Notes and captions | |
| 0.875rem | Small body text | |
| 1rem | Standard body text | |
| 1.125rem | Comfortable body text | |
| 1.25rem | Subheadings | |
| 1.5rem | Headings | |
| 2rem | Large headings | |
| 3rem | Page titles |
rem is based on the root element (html) font size. Browsers commonly use 16px by default, but a site’s CSS may set a different value.
How to use this converter
- Enter your site’s root font size from 1 to 100px. The default is 16px.
- Enter a number in either the px or rem field to convert the other value automatically.
- Use the button below either field to copy a CSS value with its unit, such as 24px or 1.5rem.
- Select a px value in the reference chart to see its rem equivalent.
Conversion formulasrem = px ÷ root font sizepx = rem × root font size
For example, with a 16px root font size, 24px ÷ 16 = 1.5rem. If your site uses a 62.5% root size (10px when the browser default is 16px), set the base to 10px.