Convert pixels to rem

Pixel (px) to rem (rem). One pixel equals 0.0625 rem.

1 px =0.0625rem (rem)

Formula

rem = pixels ÷ 16

Pixel to rem conversion table

PixelsRemRemPixels
1 px0.0625 rem1 rem16 px
2 px0.125 rem2 rem32 px
3 px0.1875 rem3 rem48 px
5 px0.3125 rem5 rem80 px
10 px0.625 rem10 rem160 px
20 px1.25 rem20 rem320 px
50 px3.125 rem50 rem800 px
100 px6.25 rem100 rem1600 px
500 px31.25 rem500 rem8000 px
1000 px62.5 rem1000 rem16000 px

To convert pixels to rem, divide the number of pixels by 16. One pixel equals 0.0625 rem, and one rem equals 16 pixels, so the relationship is fixed and exact. As a worked example, 10 px comes to 0.625 rem. Enter your own figure in the converter above to get an instant answer, or use the swap button to flip the direction. This is a typography conversion, and like every tool on UnitGlide it runs locally in your browser with no account or upload required. The table further down shows a range of common pixel values already worked out in rem, plus the reverse rem to pixel direction, which is handy for quick reference or double-checking a result by hand.

Frequently asked questions

How many rem are in a pixel?

One pixel equals 0.0625 rem. The ratio is constant, so you can multiply any number of pixels by 0.0625 to get rem.

What is the formula to convert pixels to rem?

Use rem = pixels ÷ 16. UnitGlide applies this exact formula for every value, so results stay accurate across the whole range.

How do I convert rem back to pixels?

Go the other way by using one rem equals 16 pixels. You can also press the swap button in the converter above to flip the direction in one click.

Is this pixel to rem converter accurate?

Yes. It uses a fixed multiple of the common 16px default browser root font-size used for rem; if a project sets a different root font-size, scale the result accordingly, and all math runs in your browser so nothing is rounded away on a server. For everyday use the displayed precision is more than enough.

Related conversions

Embed this converter or use the API

Put this converter on your own site, or call the free JSON API. Full documentation is on the developers page.

Embed (iframe)

<iframe src="https://unitglide.net/embed/px-to-rem" width="360" height="200"
        style="border:1px solid #e2e6ec;border-radius:12px"
        title="Pixel to Rem converter"></iframe>
<p><a href="https://unitglide.net/convert/px-to-rem">Pixel to Rem Converter</a> by UnitGlide</p>

API

https://unitglide.net/api/convert?from=px&to=rem&value=1