FreeUtil

CSS Unit Converter

Convert between px, rem, em, pt, and percentage. Configurable base font size.

16

px

1

rem

1

em

12

pt

100

%

About CSS Units

CSS supports multiple length units for sizing elements. px is an absolute unit (1/96th of an inch). rem is relative to the root font size (usually 16px). emis relative to the parent element's font size. pt is a traditional print unit (1/72nd of an inch).

When to Use What

  • rem — best for font sizes and spacing (scales with user preferences)
  • px — best for borders, shadows, and fixed layouts
  • % — best for widths and responsive layouts
  • em — best for component-relative sizing