← All tools

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.

  • px is absolute. rem is relative to the root font size (16 px by default), vw to the design width (100 vw equals the viewport width you configure, 375 px by default), and vh to 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 px to vw result 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.

Related tools

A growing collection of browser-only tools. Your data stays on your device whenever the browser can handle the task.