Converts a single value across px, rem, em, vw, vh, pt, and pc — and unlike a static conversion table, it lets you set the context that four of those units depend on: root font size, element font size, and viewport width and height. Each result row copies with its unit suffix attached, ready to paste into a stylesheet.
Fixed ratios vs context-dependent units
Three of the units convert by spec-fixed ratios that never change: 1px = 0.75pt and 1pc = 16px, so 96px = 72pt = 6pc on every screen. CSS points are defined off the CSS pixel, not physical ink, so 12pt on screen is exactly 16px regardless of display DPI. The other four are relative, which is the whole reason this tool has a config row: 24px is 1.5rem at a 16px root but 1.33333rem at 18px, and it is 1.66667vw at a 1440px viewport but a different number at every other width. A vw value copied from this tool is only correct for the viewport you typed in — that is the nature of the unit, not a rounding issue. Results are shown to six significant digits with trailing zeros stripped.
Step by step
- Set the root font size if your site changes it on html {} — the default 16px is only right if you haven't.
- Set the element font size; this is the reference for em results and frequently is not 16px.
- Set viewport width and height for the vw/vh rows (defaults are 1440 x 900).
- Enter a value, pick its unit, and copy any of the seven converted rows.
This tool is strictly CSS lengths. Physical quantities — inches to centimeters, and so on — live in the unit converter.