CSS Unit Converter β px, rem, em, pt & %
Convert between px, rem, em, pt and % for any root font-size. Enter a value and every unit updates live, then copy any result with its unit.
π Runs entirely in your browser. Your input and output are never sent to a server or stored β fully private.
em is treated like rem (relative to the root size). Click any value to copy it with its unit.
About this tool
Convert between the CSS units you reach for every day β px, rem, em, pt and percentages β against a root font-size that you control. Set the base size, type a value in any unit, and instantly see all of its equivalents, which takes the guesswork out of building responsive, accessible layouts. Whether you are translating a design from pixels to rem or sizing type fluidly, the maths is done for you, right in your browser with nothing sent anywhere.
Frequently asked questions
What is the difference between px, em and rem?
A pixel (px) is a fixed, absolute unit. An em is relative to the font-size of the current element, so it compounds when elements are nested inside each other. A rem is relative to the root font-size of the page, which keeps it predictable wherever it is used. Points (pt) come from print and equal roughly 1.333 px at the usual 96 DPI.
Why convert pixels to rem?
Sizing in rem lets your layout scale with the reader's chosen font-size, which is better for accessibility and responsive design. When someone increases their browser's default text size, rem-based spacing and type grow with it, while fixed pixels stay put. Converting your pixel values to rem against a known root size, usually 16 px, gives you that flexibility without redesigning everything.
Does the conversion happen on a server?
No. All the maths runs in your browser as you type, so the values you enter are never uploaded, logged or stored anywhere. The tool simply uses your chosen root font-size to convert between the units instantly, and it keeps working offline once the page has loaded β nothing about your design leaves your device.