πŸ–ŒοΈ PX to REM Converter β€” CSS Pixel and Root Font Size

Enter a pixel size and the root font size used by the page. The converter shows the rem value and can turn rem back into pixels for the same root.

Design Free Β· no sign-up Added 2026-10-04
Input
Browsers default to 16px unless html { font-size } changes it.
Result
CSS value

  
Details

Private by design. This tool runs entirely in your browser β€” nothing you enter or add is uploaded to any server.

How it works

  1. Set the root font size. 16px is the usual browser default.
  2. Enter a pixel value and press Convert px to rem, or enter rem and press Convert rem to px.
  3. Copy the CSS value. 1rem always equals the root font size you entered.

Examples

  • 16px at a 16px root is 1rem.
  • 24px at a 16px root is 1.5rem.
  • 1.25rem at an 18px root is 22.5px.

Frequently asked questions

What is a rem?

A rem is a CSS length equal to the font size of the root element, usually the html element. It does not depend on the parent element's font size the way em does.

Why would I change the root size?

Some designs set html { font-size: 62.5% } so 1rem is 10px, or they use a larger root for accessibility. Match the root used by the stylesheet.

Does this change my website?

No. It only calculates the equivalent length so you can paste it into CSS.

More Design tools β†’