Web guide
How to check viewport size
Viewport size is the space a web page can use inside the browser. Measuring it in CSS pixels helps explain responsive breakpoints, wrapping, overflow, and mobile keyboard behavior.
Check viewport sizeMeasure the current viewport
- Open the Viewport Size Checker in the browser being tested.
- Read the live layout viewport width and height.
- Resize the window or rotate the device.
- Compare document and visual viewport values where available.
- Pause live updates to hold a snapshot for copying.
Which viewport value should you use?
| Reading | What it represents | Typical use |
|---|---|---|
| Layout viewport | The CSS layout area, including scrollbars in the window dimensions | Responsive layout and breakpoint checks |
| Document client size | The document area excluding scrollbars | Diagnosing a scrollbar-width difference |
| Visual viewport | The region currently visible to the user | Pinch zoom and on-screen keyboard behavior |
Visual viewport values appear only when the browser exposes that API.
Viewport size versus screen resolution
The viewport is inside the browser window. Screen resolution describes the current display. A 1920-pixel-wide screen can hold a much narrower browser window, so screen dimensions are not a substitute for viewport measurements.
Responsive testing rule: record the viewport width where the layout changes, not the marketing name of a device.
CSS pixels are the useful unit
Viewport readings use CSS pixels rather than raw hardware pixels. This lets a layout remain usable across displays with different density. Browser zoom, device scaling, scrollbars, and embedded frames can affect the reported dimensions. If the page is inside an iframe, it measures the frame's viewport.
Test more than a few presets
- Drag slowly across each breakpoint to find awkward intermediate widths.
- Check both portrait and landscape orientations.
- Test browser zoom and large text settings.
- Open the mobile keyboard near fixed controls and form fields.
- Look for horizontal overflow at narrow widths.