How css unit converter works
CSS length units fall into three families. Absolute units (px, pt, pc, in, cm, mm) map to a fixed number of pixels using the CSS reference pixel where 1 inch equals 96 pixels. Font-relative units (rem, em) are multiples of the root font size, which defaults to 16px but is configurable here. Viewport units (vw, vh) are a percentage of the viewport width or height.
The converter first converts your input value to pixels using its source unit, then converts those pixels to the target unit. For example, 16px becomes 1rem when the root font size is 16px, and 12pt becomes 16px because 12 times 96 over 72 equals 16. Percent is handled relative to a configurable base.
Because rem, em, vw, vh, and percent depend on a context (root font size, viewport dimensions, or percent base), the converter exposes those as inputs you can change. The defaults of a 16px root font and a 1920x1080 viewport match the most common web design assumptions.