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
RegExp Tester
Test regular expressions and inspect matches locally.
Regex Visualizer
Visual regex pattern diagram with live match highlighting and capture group annotations.
Subnet Calculator
Compute CIDR subnets, usable hosts, and network ranges.
Cron Parser
Translate cron syntax into plain English.
URL Parser
Break a URL into protocol, host, path, and query parts.
HTML Previewer
Paste HTML and see it rendered live in a safe, sandboxed preview.
HTTP Status Code Reference
Search and look up every HTTP status code and its meaning.
MIME Type Lookup
Find the MIME type for a file extension, or the extensions for a MIME type.