Convert pixels to viewport width units instantly. Enter px and viewport width to get responsive vw values for fluid layouts and typography.
| Unit | Value | |
|---|---|---|
| pxPixel | 16 | |
| ptPoint | 12 | |
| pcPica | 1 | |
| cmCentimeter | 0.42333333 | |
| mmMillimeter | 4.2333333 | |
| inInch | 0.16666667 | |
| remRoot em | 1 | |
| emEm | 1 | |
| vwViewport width | 1.1111111 | |
| vhViewport height | 1.7777778 | |
| vminViewport minimum | 1.7777778 | |
| vmaxViewport maximum | 1.1111111 | |
| exx-height (approx) | 2 | |
| chCharacter width (approx) | 1.6666667 |
Enter a pixel value to convert it to viewport width units. The conversion expresses your px size as a percentage of the viewport width, so layouts and type scale with the window instead of jumping between breakpoints.
| Pixels | Vw (1440px) | Vw (390px mobile) | Use Case |
|---|---|---|---|
| 16px | 1.111vw | 4.103vw | Body text reference |
| 24px | 1.667vw | 6.154vw | Card heading |
| 32px | 2.222vw | 8.205vw | Section title |
| 48px | 3.333vw | 12.308vw | Hero heading |
| 64px | 4.444vw | 16.410vw | Display type |
The classic pattern pairs vw with clamp so type never escapes bounds:
h1 {
font-size: clamp(1.75rem, 1rem + 3vw, 3rem);
}
The rem terms anchor accessibility (user zoom still works); the vw term adds fluid growth. Convert your target px sizes here, drop them into clamp, and one line replaces a stack of media queries.
On phones 100vh has a known issue with browser chrome; prefer 100dvh for visible height. The same caution applies to vw only in that scrollbars can steal a few pixels. Test on a real device before shipping hero type.
For font relative units try Px to Rem, or see every unit in the full CSS Units Converter.
Nothing you paste leaves this tab. Every tool runs entirely in your browser β no upload, no server, no account.