px rem pt mm Unit Converter

Convert px, rem, em, pt, pc, in, cm, mm and Q in one go. Set the root font size and viewport width for rem and vw, and work out print pixel dimensions for A4, A5 and B5 at 72 to 600 dpi.

How to use

  1. Type a value and pick its unit (px, rem, pt, mm and so on).
  2. Set the root font size (16px by default) for rem, and the viewport width for vw. You can also give em a separate parent font size.
  3. All of px, rem, em, pt, pc, in, cm, mm and Q appear in one table, and the copy button takes the lot.
  4. For print work, choose a paper size (A4, A5, B5 or custom) and a dpi to get the pixel dimensions. A px table for 12px to 48px sits below.

FAQ

How many px is 1in, 1pt, 1cm and 1mm?

CSS Values and Units Level 4 fixes 1in = 2.54cm = 96px. From that, 1pt = 1/72in (about 1.3333px), 1pc = 1/6in = 16px, 1cm = 96px / 2.54 (about 37.7953px), 1mm is a tenth of that (about 3.7795px) and 1Q = 1/40cm (about 0.9449px). So 12pt is 16px.

What is the formula for px to rem?

rem = px / root font size. With a 16px root, 24px is 1.5rem. If html is set to 10px, 32px is 3.2rem. Change the root font size field and every value is recalculated against it.

What is the difference between rem and em?

rem always follows the root (html) element's font size, while em follows the parent element's font size. You can enter an em base size separately here; left blank it is taken to equal the root font size.

Will a mm to px result print at exactly that size?

No. The mm and cm to px values use the CSS ratio (96px = 1in), so they are for on-screen CSS. For print and image work, dpi decides the pixel count, so use the print section: pixels = mm / 25.4 x dpi. A4 (210 x 297 mm) is 2480 x 3508px at 300 dpi and 794 x 1123px at 96 dpi.

Is a CSS pt the same as a pt in Photoshop?

In CSS 1pt is always 1/72in, about 1.3333px. Image editors map points to pixels through the document resolution (ppi), so the result differs. Enter that resolution in the dpi field and work in mm to match.

My B5 paper has different dimensions.

B5 here is the ISO 216 size, 176 x 250 mm. JIS B5 (182 x 257 mm) and other regional sizes differ, so choose custom in the paper list and type the width and height in mm.

AI agents: this calculation is available over an API without the form — see /llms.txt and the tool list at /api/calc; confirm the final result on this page.

Related tools