PX to REM Converter

Convert px and rem at the root font size your CSS uses.

Convert

Base font size
12141618

The root font size that rem is based on.

Edit either field and the other updates automatically.

Common values

16px root
pxrem

Click a row to load its px value into the converter.

What is the PX to REM Converter?#

The PX to REM Converter converts between px and rem for CSS. Both fields stay editable: type in either one and the other updates, ready to copy into a stylesheet.

A rem is a multiple of the root font size. At a 16px root, 16px is 1rem.

How to Use#

  1. Enter a number in the px or rem field.
  2. Copy the value you need.

Options#

  • Base font size: the root font size the conversion is based on, from 12, 14, 16, or 18. Match the font-size of your html element. Most projects use 16.

Common Values#

The table lists common px values with their rem equivalents at the current base. Choosing a row puts that px value into the px field and updates the rem field.

Use Cases#

  • Turning px sizes from a design mockup into rem for a fluid layout.
  • Reading an existing rem value back as px to picture its size.
  • Aligning spacing and type sizes to one root before writing CSS.

Notes#

  • The other field is rounded to four decimal places at most. At a 16px root, a px value of 12 reads 0.75 in the rem field.
  • rem changes with the root font size, so match the base to your CSS before you copy.

FAQ#

  • Converter

Last updated:

Related tools