Converters

CSS Unit Converter

Convert CSS lengths between px, em, rem, pt and percent using a configurable base font size.

  • 24px
  • 1.5em
  • 1.5rem
  • 18pt
  • 150%

How to use it

  1. Enter a value and unit The length you want to convert.
  2. Set the base font size Usually 16px, the browser default.
  3. Read every unit px, em, rem, pt and percent at once.

Examples

24px at 16 base 1.5rem
12pt 16px

About this tool

CSS offers several length units, and switching between them by hand is error-prone. This converter turns any value in px, em, rem, pt or percent into all the others, based on the font size you choose.

It’s handy when translating a design’s pixel values into relative units for responsive, accessible layouts, or when matching print-style points to screen pixels. The base font size defaults to the browser standard of 16px. Everything runs in your browser.

Frequently asked questions

How are em and rem calculated?

Both are relative to the base font size you set — at 16px, 1.5rem equals 24px. The difference is what the base refers to in real CSS.

How does pt relate to px?

CSS defines 1 inch as 96px and 72pt, so 1pt equals 1.333px and 12pt equals 16px.

Related tools

Updated June 15, 2026