CSS / FRONTEND · RUNS IN YOUR BROWSER

PX to VW / VH Converter

Convert pixels to viewport units against your design file's dimensions.

Calculated against the design width and height you enter; 1vw equals one percent of the viewport width.

Design dimensions

Enter the canvas width and height the design actually uses so the ratio is right.

Reverse conversion

Equivalent pixels144px

Converted

VW (against width)4.4444vw
VH (against height)7.1111vh

Common size reference

Pixel valuevwvh
8px0.5556vw0.8889vh
12px0.8333vw1.3333vh
16px1.1111vw1.7778vh
24px1.6667vw2.6667vh
32px2.2222vw3.5556vh
48px3.3333vw5.3333vh
64px4.4444vw7.1111vh
96px6.6667vw10.6667vh
128px8.8889vw14.2222vh
240px16.6667vw26.6667vh
320px22.2222vw35.5556vh

About this tool

Design files are usually drawn at a fixed width such as 1440px, and turning that into a layout that scales with the viewport means converting pixels into vw. Enter the design's width and height, then a pixel value, and you get both the vw and vh equivalents. The conversion also runs in reverse so you can check what a vw value works out to in real pixels.

How it works

  1. Enter the design file's viewport width and height.
  2. Enter a pixel value to get the matching vw and vh.
  3. Copy the unit you need, or convert back to verify.

Privacy

Every calculation and preview runs inside this browser. Your input is never uploaded, stored, or written to the URL or any log.

Frequently asked questions

Does vw include the scrollbar?
Yes. vw is measured against the viewport width, so on a desktop browser with a visible vertical scrollbar, 100vw is slightly wider than the content area and can cause horizontal overflow. Use 100% or a newer unit such as dvw when that matters.
Should font sizes use vw directly?
Not on their own. A pure vw font size becomes unreadable at extreme viewport widths and ignores the reader's own text size setting completely. Wrap it in clamp() between a minimum and maximum and keep a rem constant in the preferred value.