Yuzool

Dev Tools

Px to rem converter

Type a size in px, rem, em, pt or another CSS unit to see it in all the others. The root font size is 16 px unless you change it, as in every browser by default.

Common sizes at 16 px

Converted by this page:

pxrem
120.75
140.875
161
181.125
201.25
241.5
322
483

Why use rem?

rem sizes follow the reader’s chosen font size: someone who sets their browser to larger text gets larger text and spacing. px sizes don’t. Use rem for type and most spacing, px for hairlines and borders.

How to use it

  1. Type the size and pick its unit.
  2. Change the root font size if your site sets one.
  3. Copy the size you need.

Questions

How do I turn px into rem?

Divide by the root font size: 24 px ÷ 16 = 1.5 rem.

What is the 62.5% trick?

Setting html { font-size: 62.5% } makes 1 rem 10 px, so sizes are easy to work out. Set the root size here to 10 to match.

Related tools

Open all 35 Dev Tools. Everything runs in your browser; nothing you paste is uploaded.

Settings

History

Snippet