Web & time

CSS Unit Converter

Convert px, rem, em, pt and % using a base font size.

Runs locally Free No signup

A working example is preloaded — edit it or clear it.

CSS unit converterCSS

px
rem
em
pt
%

em and % assume the parent font size equals the base value.

What this tool does

A design handed over in pixels still has to become rems, ems and points. This converter applies one base font size to convert all common CSS length units at once. For em and %, the base is the parent font size, assumed equal to the root size here.

How to use it

  1. Enter a value and choose its unit.
  2. Set the base font size if it is not 16px.
  3. Copy the unit you need.

Questions

What is the difference between em and rem?

rem is relative to the root font size. em is relative to the parent element's font size, which this tool approximates with the same base.

How is percentage calculated?

For font sizes, 100% equals the base font size; the converter uses that assumption.

How many points are in a pixel?

1pt = 4/3px, so 12pt = 16px.

← Back to all tools
Type to filter, ↑↓ to move, ↵ to open, esc to close.esc