UTILS.
Private by default
px

CSS Unit Converter

Convert a CSS length between px, rem, em, pt, pc, in and cm.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

About this tool

Convert CSS length units using px as the base and a configurable root font-size, all in your browser.

Frequently asked questions

How are rem and em calculated?
Both are taken relative to the root font-size you set (default 16px), so 1rem and 1em equal that many pixels here.
What pixel ratios are used?
CSS reference units: 1in = 96px, 1pc = 16px, 1pt = 96/72px and 1cm = 96/2.54px.

More tools