CSS Unit Converter (px / rem / em / pt / %)

Root font size (px)
Parent font size (px, for em/%)
px rem em pt %
rem is relative to the root font size; em and % are relative to the parent font size; 1pt = 1.333px (96dpi).

About this tool

Convert a length between the five most common CSS units: px, rem, em, pt and %. Type a value in any field and the other four update instantly. rem is computed against the root font size (the html element, 16px by default), while em and % are computed against the parent element's font size, which you can set separately for nested contexts.

The conversions use the standard web relationship 1pt = 1/72 inch and 1 inch = 96px, so 1pt ≈ 1.333px. This is handy when translating a print or design-tool measurement (points) into responsive web units. Everything is calculated locally in your browser.

Related tools

CSS Gradient GeneratorCSS Shadow GeneratorColor Converter