CSS Unit Converter
Convert between px, rem, em, and pt for CSS.
161112Recommended next steps
Related tools
Convert colors between HEX, RGB, and HSL, and check WCAG contrast.
Encode text to HTML entities or decode entities back to text.
Create a QR code from any text or link and download it as PNG or SVG.
Frequently asked questions
Divide the pixel value by the root font size. With the browser default of 16px, 16px is 1rem, 24px is 1.5rem, and 8px is 0.5rem. Pick px as the source unit and read the rem result.
Use the font-size set on your :root or html element. Browsers default to 16px, so that is the value here unless you have changed it. rem is always relative to the root, while em is relative to the element's own (or parent's) font size — this tool treats both against the size you enter.
CSS defines 1 inch as 96px and as 72pt, so 1pt equals 96/72 px (about 1.333px) and 16px equals 12pt. The px–pt conversion does not depend on the root font size.
No. The conversion runs entirely in your browser with plain JavaScript. The values you enter never leave this page.
Last updated 2026-06-23.