Pixels to rem converter
Enter a size in pixels and the root font size, and this tool shows the same size in rem units.
Results
Enter your values to see the result.
About this tool
It is useful for web design, where rem sizes let text and spacing grow with the reader's font settings.
- How it is calculated
- rem = pixels ÷ the root font size. Browsers use 16 px unless the page changes it.
- Worked example
- With Pixels: 24 px; Root font size: 16 px, the result is: Rem: 1.5 rem.
- Good to know
- The size in rem is the pixels divided by the root font size. Browsers use 16 pixels as the root font size unless the page changes it. If your page sets a different size on the root element, enter it so the result matches.
Frequently asked questions
What is a rem?
A rem is a unit equal to the font size of the root element of the page. With the usual 16 pixels, one rem equals 16 pixels.
Why use rem instead of pixels?
Rem sizes follow the root font size, so when a reader increases their browser's text size, the layout scales with it. Pixel sizes stay fixed.