CSS Unit Converter
Convert px, rem, em, %, vw, vh, pt, cm, and other CSS units, with your own root font size and viewport size.
Runs on your device.
Context
Absolute units follow the CSS rule: 1in = 96px. These are CSS pixels, not physical screen pixels.
How to Use It
- Enter the value and its unit.
- If needed, change the context (font and viewport sizes).
- Copy the CSS value you need.
Questions and Answers
How many pixels is 1rem?
It depends on the root (html) font size. Browsers use 16px by default, so 24px is 1.5rem.
Good to Know
Relative units (em, %, vw, vh) depend on the context you enter. ch, ex, and container units are not supported.
Related Tools
- Unit ConverterConvert length, weight, temperature, area, volume, speed, data, time, pressure, and energy, with Iranian units such as mesghal, sir, and jerib.
- Color Converter (HEX, RGB, HSL)Convert a color between HEX, RGB, HSL, HWB, OKLCH, and CMYK, and see its contrast with white and black for readable text.