What is my viewport?
The viewport is the visible area of the page inside your browser window. It updates when you resize the window or rotate the device.
Results are estimates for information only. Privacy · Terms · Guides
Viewport
The visible page area
The viewport is the visible area of the page inside the browser window—smaller than full screen resolution when toolbars, sidebars, or window chrome take space. It updates live as you resize or rotate the device.
Responsive layouts rely on viewport width more than on marketing “screen resolution” numbers.
Resize to test layouts
Drag the window or use developer responsive mode to see the viewport change. Mobile browser UI (collapsing URL bars) can also alter height as you scroll.
Use screen resolution for the display’s reported size and available screen size for desktop area minus taskbar/dock.
Learn more
Guide: screen resolution vs viewport.
Get your related information
Frequently Asked Questions
What is a viewport?
The viewport is the visible browser content area measured with window.innerWidth and innerHeight in CSS pixels.
Why does it change when I resize?
Resizing the window or rotating a phone changes the visible area, so the viewport updates.
Is viewport the same as screen resolution?
No. Screen resolution is the full display. The viewport is only the browser content area.
Do browser chrome and toolbars affect it?
Yes. Address bars and toolbars reduce the viewport height, especially on mobile.
Why do developers care about viewport?
Responsive layouts, media queries, and sticky headers are based on viewport size, not full screen resolution.