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
16px is a common browser default. Choose 10px if your site sets the html font size to 62.5%.
Convert multiple values
Enter one number per line. Blank lines are ignored. Convert up to 100 values at a time.
Enter numbers from 0 to 999999. Decimals are supported.
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.
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.
Frequently asked questions
What is the difference between px and rem?
px is a fixed CSS pixel value. rem is based on the font size of the html element, so it can scale with your site’s root size.
Which root font size should I choose?
Use 16px when the html font size follows the common browser default. If your CSS sets html to 62.5%, use 10px. If you are unsure, start with 16px.
How do I use the batch conversion results?
Enter one number per line, then copy the converted values in the same order. Blank lines are ignored, and more than 100 values are not processed.