Skip to content
ZeroServer.tools

Viewport Size Tester

Check your browser's viewport size, screen resolution, device pixel ratio, and orientation in real time.

Viewport (CSS px)
0 × 0
window.innerWidth × innerHeight
Screen Resolution
0 × 0
Total screen pixels
Available Screen
0 × 0
Minus taskbar/OS chrome
Device Pixel Ratio
1x
window.devicePixelRatio
Physical Pixels
0 × 0
CSS px × DPR
Orientation
unknown
screen.orientation.type
Visual Viewport
0 × 0
After mobile pinch-zoom

Resize your browser window to see values update in real time. On mobile, rotate your device to see orientation change.

What is viewport size?

The viewport is the visible area of a web page in CSS pixels. window.innerWidth and innerHeight give the viewport dimensions excluding browser UI. The Device Pixel Ratio (DPR) tells you how many physical pixels map to one CSS pixel — on a Retina/HiDPI screen, DPR is 2 or 3. Multiply viewport pixels by DPR to get physical pixel dimensions. Use CSS @media queries with (min-width) to target different viewports.

Private & free — this tool runs entirely in your browser.

Recommended: IndieKit Ship your Next.js startup in days.affiliate

Related Developer Utilities tools