PX to REM Converter
Convert px to rem and rem to px at the standard 16px root size. Instant, free, and private in your browser.
How to use the PX to REM converter
Enter a pixel value
Type the px you want to convert in the Pixels field. The rem value updates the moment you type, based on the 16px root size.
Or start from rem
Prefer the other direction? Type a rem value in the REM field and the pixel equivalent appears at once. The arrow buttons nudge either value up or down.
Copy the result
Click the copy icon inside a field, or tap any row in the reference table, to grab the value with its unit ready to paste into your stylesheet.
Why convert px to rem?
REM units scale with the root font size, so a layout built in rem respects a reader’s browser zoom and their chosen default text size. Pixels ignore that. Bump the browser text up for readability and px spacing stays frozen, while rem spacing grows with it.
The math is simple: rem = px divided by 16, the default root size in every major browser. So 16px is 1rem, 24px is 1.5rem, and 8px is 0.5rem. This converter does that division both ways, so you can read a pixel value off a design file and get the rem, or go the other direction.
I keep it open in a side tab during a build. The reference table below lists the sizes you reach for most, from a 1px border to 96px of hero spacing, and the arrow buttons nudge a value up or down when you are dialing in spacing.
Features
Two-way conversion
Go px to rem or rem to px in one panel, with results that update as you type.
Step buttons
Nudge a value up or down with the arrow buttons to fine-tune spacing fast.
Reference table
A full px to rem table from 1px to 96px at the 16px root size, one tap to copy any row.
One-click copy
Copy any value with its unit attached, from the fields or any table row.
Runs in your browser
Every calculation is local. Nothing you type is uploaded or stored.
Free, no sign up
No account, no limits, no watermark. Open it and convert.
Similar Tools
More Developer tools you might find useful.
PX to REM converter FAQ
What is 16px in rem?
16px is 1rem, because browsers set the default root font size to 16px and rem is relative to that root. By the same math, 8px is 0.5rem, 24px is 1.5rem, and 32px is 2rem. Divide any pixel value by 16 to get its rem equivalent.
What is 1rem in px?
1rem is 16px by default, since browsers set the root font size to 16px and rem scales from that root. So 1.5rem is 24px, 2rem is 32px, and 0.5rem is 8px. Multiply any rem value by 16 to get pixels.
How do I convert px to rem?
Divide the pixel value by the root font size, which is 16px by default in every major browser. So 16px is 1rem, 24px is 1.5rem, and 10px is 0.625rem. Type a px value above and this converter does the division instantly, both ways.
How do I convert rem to px?
Multiply the rem value by 16, the default root font size. So 1rem is 16px, 1.25rem is 20px, and 0.5rem is 8px. Enter a rem value in the REM field above and the pixel equivalent appears at once.
Should I use px or rem in CSS?
Use rem for font sizes, spacing, and layout, because rem scales with a reader browser font-size setting and px does not, which helps accessibility. Keep px for details that must stay exact, like a 1px border. Many projects mix both, rem for scale and px for precision.
Why is 1rem equal to 16px?
1rem equals 16px because 16px is the default font size browsers apply to the root html element, and rem is measured relative to that root. If a site sets the html font size to something else, such as 10px, then 1rem becomes that value instead.
What is 12px, 20px, or 24px in rem?
At the default 16px root, 12px is 0.75rem, 20px is 1.25rem, and 24px is 1.5rem. The rule is simple: divide the pixel count by 16. The reference table above lists every common size from 1px to 96px so you can copy the exact rem.
Is this px to rem converter free?
Yes, it is completely free with no sign up, no limits, and no watermark. It runs entirely in your browser, so your values never leave your device. Use it as often as you like for any project.