CSS Unit Converter
Convert between px, rem, vw and vh with a configurable root font size and viewport, in single or batch mode.
This tool runs entirely in your browser. Your input is never uploaded.
References & presets
px is absolute. rem is relative to the root font size, vw to the design width, and vh to the viewport height.
Single value
Enter a value to convert.
- rem uses the root font size (16px).
Batch values
CSS Unit Converter
Convert CSS lengths between px, rem, vw and vh in either direction. Pick the source and target unit, enter a value, and read the result instantly.
pxis absolute.remis relative to the root font size (16 px by default),vwto the design width (100 vw equals the viewport width you configure, 375 px by default), andvhto the viewport height.- The settings panel also carries common mobile and desktop presets, so converting a mobile design is one click away: pick 375 × 812, for example, then every
pxtovwresult is sized for that design. - The batch panel converts many values at once — paste several lines with one or more numbers per line, split by spaces or commas — and the numbers-only output can be copied or downloaded.
All conversions run locally in your browser. No server round-trips, no uploads.