Home › Developer Tools › PX to VW Converter

PX to VW Converter

Convert pixel measurements from a design mockup into viewport units. Enter the artboard width and height to get vw, vh, vmin and vmax, convert vw or vh back to pixels, and see how the value renders on phones, tablets and desktops.

Last updated:

Direction

One value, or several separated by commas or spaces.

px

The design / artboard width

px
Enter your values to see the result.
Advertisement
Advertisement

How to use the PX to VW Converter

  1. Choose the direction: px to vw/vh, vw to px or vh to px.
  2. Enter one or more values, such as 24 or 16, 24, 48.
  3. Set the viewport size your design was made for, e.g. 1440 × 900 or 375 × 812.
  4. Read the result and check the breakpoint table to see how it scales on other screens.
  5. Copy the CSS value or download the tables as CSV.

Viewport unit formulas

ConversionFormulaExample (1440 × 900)
px → vwpx ÷ width × 10024px = 1.6667vw
vw → pxvw × width ÷ 1005vw = 72px
px → vhpx ÷ height × 10090px = 10vh
vh → pxvh × height ÷ 10050vh = 450px
vmin / vmaxpx ÷ min/max(width, height) × 10090px = 10vmin = 6.25vmax

1vw in pixels at common screen widths

Viewport width1vw10vwTypical device
320px3.2px32pxSmall phone
375px3.75px37.5pxPhone
768px7.68px76.8pxTablet portrait
1024px10.24px102.4pxTablet landscape
1440px14.4px144pxDesktop
1920px19.2px192pxFull HD monitor

Because vw scales with the screen, a value that looks right on your 1440px mockup will be 3.84 times smaller on a 375px phone. Check the breakpoint table above, and use clamp() to set limits.

Frequently asked questions

How do I convert px to vw?

Divide the pixel value by the viewport width and multiply by 100: vw = px ÷ viewport width × 100. On a 1440px design, 24px = 24 ÷ 1440 × 100 = 1.6667vw.

How do I convert vw to px?

Multiply the vw value by the viewport width and divide by 100: px = vw × width ÷ 100. 5vw on a 1440px-wide screen is 72px, and on a 375px phone it is 18.75px.

What is 1vw?

1vw is 1% of the viewport width. On a 1920px-wide browser window 1vw = 19.2px; on a 375px phone it is 3.75px. 1vh is 1% of the viewport height in the same way.

What are vmin and vmax?

vmin is 1% of the smaller viewport dimension and vmax is 1% of the larger one. They are useful for elements that should fit on screen in both portrait and landscape orientation.

Should I use vw for font sizes?

Pure vw font sizes become tiny on phones, huge on wide monitors and do not grow with browser zoom. Combine vw with rem inside clamp() to set a minimum and maximum, for example clamp(1rem, 0.8rem + 1vw, 1.5rem).

Does 100vw include the scrollbar?

Yes. On desktop browsers with classic scrollbars, 100vw includes the scrollbar width, so width: 100vw can cause a small horizontal scroll. Use width: 100% for full-width blocks inside the page.

What about 100vh on mobile?

On mobile browsers 100vh usually equals the largest viewport, with the address bar hidden, so content can be cut off. The newer units svh, lvh and dvh (small, large and dynamic viewport height) solve this in modern browsers.

Are all the tools on FreeToolCabin tested for quality and accuracy?

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

Related tools

PX to REM ConverterConvert px to rem or em and back, with a 1-100px table and a whole-CSS converter.PX to EM ConverterConvert pixels to em using the parent font size, and em back to px, with conversion tables.CSS Clamp GeneratorTurn min/max sizes and viewport widths into a fluid CSS clamp() value in rem and vw.Aspect Ratio CalculatorCalculate image sizes for 16:9, 4:3 and any ratio.Font Size ConverterConvert font sizes between px, pt, em, rem, % and vw, with a 6–72px chart and CSS.Open Graph PreviewPaste OG tags and preview how links look on Facebook, X and LinkedIn.YouTube Embed Code GeneratorCreate responsive YouTube embed code with start time, autoplay, loop and privacy mode.CSS Box Shadow GeneratorDesign layered CSS box shadows with a live preview, presets and one-click Copy CSS.CSS Border Radius GeneratorRound each corner, draw elliptical 8-value radii or random blob shapes and copy the CSS.CSS Button GeneratorDesign CSS buttons with gradients, borders, shadows and hover and active states, then copy the code.CSS Flexbox GeneratorBuild flexbox layouts visually: set container and item properties, then copy the CSS and HTML.Twitter Card GeneratorCreate X / Twitter Card meta tags with Open Graph fallbacks, character counters and a live preview.CSS Grid GeneratorDraw CSS grid layouts: set tracks and gaps, drag to name areas, then copy the CSS and HTML.Glassmorphism CSS GeneratorDesign frosted-glass UI cards with blur, transparency and border sliders, then copy the CSS.CSS Text Shadow GeneratorLayer CSS text shadows with a live preview and neon, 3D, outline and retro presets.HTML Editor (Live Preview)Write HTML, CSS and JavaScript and see a live, sandboxed preview as you type.HTML to JSX ConverterConvert HTML to valid React JSX: className, htmlFor, style objects, self-closing tags and events.CSS Clip-Path GeneratorDraw CSS clip-path shapes by dragging points: polygons, circle, ellipse and inset. Copy the CSS.CSS Animation GeneratorCreate CSS keyframe animations from 23 presets with live preview, timing controls and Copy CSS.CSS Triangle GeneratorMake CSS triangles in 8 directions with the border trick or clip-path. Set size and color, copy CSS.CSS Loader GeneratorPick from 14 pure CSS spinners and loaders, set color, size and speed, then copy the HTML and CSS.Cubic Bezier GeneratorDrag the control points to design a CSS easing curve, compare it with linear and copy cubic-bezier().CSS Filter GeneratorAdjust blur, brightness, contrast, hue, sepia and drop-shadow on an image and copy the CSS filter.CSS Specificity CalculatorCalculate CSS selector specificity (a, b, c), including :is(), :not(), :has() and :where(), and compare.Google Maps Embed GeneratorTurn an address or coordinates into responsive Google Maps iframe embed code, no API key.Neumorphism CSS GeneratorDesign soft UI neumorphic shapes with live preview and copy the box-shadow CSS.SVG Wave GeneratorMake layered SVG waves for section dividers and export SVG, PNG or a CSS background.SVG Blob GeneratorGenerate random organic SVG blob shapes with gradients and export SVG, PNG or CSS clip-path.CSS @font-face GeneratorTurn font files or URLs into ready-to-paste @font-face rules with weights, styles and a preview.CSS Media Query GeneratorBuild @media rules for widths, orientation, dark mode and hover, or get framework breakpoints.CSS Scrollbar GeneratorStyle scrollbars: width, colors, radius and hover, with ::-webkit-scrollbar and scrollbar-color CSS.CSS Sprite GeneratorPack many icons into one sprite sheet PNG and get CSS classes with background-position.CSS Text Gradient GeneratorMake gradient text with background-clip:text: color stops, angle, font preview and fallback CSS.CSS Toggle Switch GeneratorDesign pure-CSS toggle switches: size, colors, shape and animation. Copy accessible HTML + CSS.CSS Tooltip GeneratorBuild pure CSS tooltips: position, arrow, colors, padding and animation. Copy HTML and CSS.HTML Form BuilderDrag and drop form fields with labels and validation, then copy accessible HTML and CSS code.Iframe GeneratorCreate iframe embed code: size or responsive ratio, border, allow, sandbox, lazy load, live preview.SVG Path EditorEdit an SVG path d attribute visually: drag points, edit commands, convert, scale and minify.Font Pairing ToolPreview Google Font heading and body pairs on real layouts and copy the embed code and CSS.HTML Accessibility CheckerPaste HTML to find WCAG accessibility problems with impact level, the failing element and a fix.HTML Image Map GeneratorDraw clickable rectangle, circle and polygon hotspots on an image and get image map HTML.SVG ViewerOpen or paste SVG code to preview it live with zoom, backgrounds, size info and PNG export.Pathfinding VisualizerAnimate BFS, DFS, Dijkstra, A* and greedy search on a grid with walls, weights and mazes.SVG to CSS Data URITurn SVG code into a small URL-encoded data URI for CSS backgrounds, with Base64 size comparison.SVG to JSXTurn SVG code into a clean React component: camelCase attributes, style objects, TypeScript.Tailwind CSS Cheat SheetSearchable Tailwind class to CSS reference with live previews, class decoder and color palette.Web App Manifest GeneratorCreate a PWA manifest.json and every app icon size from one image, downloaded as a ZIP.CSS Background Pattern GeneratorMake pure-CSS stripes, dots, checkerboard, zigzag and grid backgrounds and copy the code.CSS Color Filter GeneratorTurn a HEX color into a CSS filter that recolors black icons and SVGs, with an accuracy score.CSS Gradient Animation GeneratorCreate animated gradient backgrounds: pick colors, angle and speed, preview live and copy the CSS.CSS Hover Effects GeneratorPick button, link and image hover effects, tweak colors and timing, and copy the HTML and CSS.CSS InlinerMove CSS from style blocks into inline style attributes so HTML emails render in every client.CSS Shape Divider GeneratorCreate wave, tilt, curve and triangle section dividers and copy the SVG, HTML and CSS.CSS Transform GeneratorRotate, scale, skew and translate an element with sliders and copy the CSS transform code.
See all 52 Web, HTML & CSS Tools →