Convert CSS px values to rem, em, pt, %, and viewport units with an adjustable base font size. Includes a bulk converter, a reference scale, and a live size preview.
Most browsers default html to 16 px. Users can override this in browser settings — that's why rem beats px for accessible typography.
Common px values converted at the current root font size (16 px).
| px | rem | em | pt | % of parent |
|---|
Paste CSS or a list of px values — every NNpx is rewritten to the target unit, with the original kept as a comment.
% is relative to parent font-size (so 62.5% on html makes 1rem = 10 px — a common trick, but it breaks user font-size overrides).clamp(1rem, 2.5vw, 1.5rem)). On mobile, prefer svh / dvh / lvh over vh to avoid the URL-bar jump.1 pt = 1/72 in ≈ 1.333 px at the default 96 DPI.