Skip to content

CSS Unit Converter

Type a value in any field. All other units update instantly.

px
px
px
px
Live preview
Aa
16px

Quick Reference

Common conversions at 16px root font-size and 1920px viewport width.

px rem em pt % vw
10.06250.06250.756.250.052
20.1250.1251.512.50.104
40.250.253250.208
80.50.56500.417
100.6250.6257.562.50.521
120.750.759750.625
140.8750.87510.587.50.729
1611121000.833
181.1251.12513.5112.50.938
201.251.25151251.042
241.51.5181501.25
3222242001.667
402.52.5302502.083
4833363002.5
6444484003.333
9666726005

CSS Units Explained

px Absolute

Pixels are the most straightforward CSS unit. 1px equals one device pixel on a standard display. Use px for borders, shadows, and fixed-size elements where precision matters.

rem Relative

Rem is relative to the root element's font-size (usually 16px by default). It's the preferred unit for typography and spacing because it scales uniformly when users change their browser font settings.

em Relative

Em is relative to the parent element's font-size. Useful for component-level scaling where children should grow proportionally to the parent. Be careful with nesting since em compounds.

pt Absolute

Points come from print typography: 1pt = 1/72 of an inch = 1.333px. Rarely used in web CSS, but essential when matching web layouts to print designs or PDF specifications.

% Relative

Percentage is relative to the parent element. For font-size, 100% equals the parent's font-size. For width, 100% fills the parent. Context changes what the percentage refers to.

vw / vh Viewport

Viewport units: 1vw = 1% of viewport width, 1vh = 1% of viewport height. Ideal for full-screen layouts, responsive typography (via clamp()), and elements that should scale with the browser window.

Copied