Quick math

PX ↔ REM converter

Translate design measurements without hiding the formula.

Privacy built inYour work stays with you
Converted value
1rem
1rem

Your work stays private in your browser while you use this tool.

In short

What does px ↔ rem converter do?

The px/rem converter divides pixels by the root font size to get rem, or multiplies rem by the root font size to get pixels. With the common 16 px root, 1 rem equals 16 px.

Input
A pixel or rem value and the root font size.
Result
Equivalent px and rem measurements.
Price
Free
Account
Not required
A quick, useful guide

How to use px ↔ rem converter

01

Add your input

A pixel or rem value and the root font size.

02

Choose your settings

Translate design measurements without hiding the formula.

03

Save or copy

Equivalent px and rem measurements.

A practical tip

Most browsers default to a 16px root size, but your project may set a different value.

Practical uses

When to use px ↔ rem converter

Translate a 24 px design-system spacing value into rem for CSS.

Check the pixel equivalent of a 1.125 rem type size at a custom root size.

Migrate a stylesheet from fixed pixel lengths to root-relative units.

Worked example

A concrete px ↔ rem converter example

Input
24 px
Settings
Root font size: 16 px; pixels to rem
Result
1.5 rem
What to expect

How it works

For px to rem, the value is divided by the positive root font size. For rem to px, it is multiplied by that size. Results retain useful decimal precision and can be copied with the output unit.

Know before using

Limits and edge cases

  • The calculator does not inspect your page's computed root font size; you must enter the value that applies to your CSS environment.
  • It performs a numeric conversion only and does not account for browser minimum-font preferences, zoom, or root sizes that change across media queries.
References

Standards and sources

Common questions

PX ↔ REM converter FAQ

Is px ↔ rem converter free to use?

Yes. PX ↔ REM converter is free to use.

Does px ↔ rem converter keep my work private?

Yes. Your work stays private while you use the tool — nothing you enter is uploaded.

What root font size should I enter?

Enter the computed font size of the document's root element for the context you are targeting. Many projects use 16 px, but it is not guaranteed.

Is rem the same as em?

No. rem is relative to the root element's font size, while em is generally relative to the element's own computed font size. This calculator handles rem only.