Mobile Viewport Checker

Real-time mobile viewport analyzer. Inspect CSS layout viewport, visual viewport zoom scale, device screen dimensions, and responsive browser properties with zero setup.

100% In-Browser • Live Dynamic Telemetry • Zero Server Tracking
Advertisement
Responsive Header Ad Slot (728x90 / 320x50)
Analyzing Device...
-- × --
Current CSS Layout Viewport (Width × Height in CSS px)
Visual Viewport
-- × --
Active visible frame inside browser window (visualViewport.width × height).
Visual Zoom Scale
1.00×
Pinch-to-zoom factor (updates live as you zoom in/out).
Physical Screen
-- × --
Total monitor dimensions (screen.width × screen.height).
Device Pixel Ratio
--
Hardware physical pixels per 1 CSS pixel (window.devicePixelRatio).
Screen Orientation
--
Angle: 0°
Touch Support
-- Points
Max simultaneous multi-touch contact points.

Live Responsive Viewport Diagram

Dynamic proportional visual comparison illustrating Screen Hardware bounds (Outer) vs CSS Layout Viewport (Green) vs Active Visual Viewport (Purple).

Production Viewport Meta Tag

Standard HTML5 viewport definition optimized for responsive mobile web design and full-screen notch support:

<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
Advertisement
Responsive In-Content Ad Slot

Understanding Mobile Viewports: Layout Viewport vs. Visual Viewport

When mobile browsers were first introduced on smartphones, web pages were exclusively built for wide 980-pixel desktop monitors. If an iPhone or Android phone attempted to render a desktop website directly inside its small 320-pixel screen, elements would either break violently or overflow off-screen. To solve this problem, mobile browser rendering engines (such as WebKit and Blink) introduced a two-tier viewport architecture: the Layout Viewport and the Visual Viewport.

1. The Layout Viewport

The Layout Viewport (accessible via window.innerWidth and window.innerHeight) acts as the virtual desktop canvas upon which the browser executes CSS calculations. When you define an element as width: 100%, it matches 100% of the Layout Viewport. On responsive websites with a proper viewport meta tag, the Layout Viewport automatically matches the physical device width in CSS pixels (e.g. 393px on an iPhone 16 Pro, 412px on a Samsung Galaxy S24).

2. The Visual Viewport

The Visual Viewport (accessible via the W3C window.visualViewport API) represents the specific rectangle of the page that is currently visible on the physical glass screen. When a user double-taps or pinches-to-zoom into a photograph, the Layout Viewport remains completely stationary (preventing the webpage layout from re-flowing or breaking), but the Visual Viewport shrinks and shifts, exposing a higher magnification level (scale factor > 1.0).

Similarly, when a user taps into a text input and the smartphone on-screen virtual keyboard slides up, the Visual Viewport height shrinks by 30% to 50%, while the Layout Viewport remains unchanged.

Why the Viewport Meta Tag Is Fundamental to Responsive Web Design

Without a viewport meta tag declared inside the HTML <head> section, modern mobile browsers assume legacy desktop rendering, setting the default layout viewport to an artificial 980 pixels and scaling it down into a tiny microscopic page. Declaring:

<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">

instructs the browser to set the Layout Viewport width to match the physical device width in logical CSS pixels at a 1:1 initial zoom scale. The optional attribute viewport-fit=cover expands the website underneath modern smartphone camera cutouts and Dynamic Islands.

Modern CSS Viewport Units: dvh, svh, and lvh Explained

For years, frontend developers suffered from the infamous 100vh bug on mobile devices: because Safari and Chrome hide and reveal address bars dynamically during page scrolling, height: 100vh caused bottom navigation buttons to get buried under browser navigation chrome.

  • svh (Small Viewport Height): Represents the viewport height when the browser address bar and navigation controls are fully expanded. Ideal for ensuring modal dialogs and sticky footers never get cut off.
  • lvh (Large Viewport Height): Represents the maximum viewport height when browser toolbars collapse during active scrolling.
  • dvh (Dynamic Viewport Height): Dynamically scales in real time as the browser address bar expands and collapses. Perfect for 100% full-screen immersive hero sections.

Frequently Asked Questions

Your smartphone utilizes a high Device Pixel Ratio (typically 2x or 3x). For example, an iPhone 16 Pro has a physical hardware screen resolution of 1206 × 2622 pixels, but operates at a 3x DPR, producing a clean logical CSS viewport of 402 × 874 pixels.
You can open Chrome or Firefox Developer Tools (press F12 or Ctrl+Shift+I) and toggle the Device Toolbar (Ctrl+Shift+M) to simulate any smartphone or tablet viewport.
Horizontal scrollbars typically occur when an image, table, code block, or container has a fixed pixel width (e.g. width: 500px) that exceeds the mobile viewport width (e.g. 393px). Using max-width: 100% and box-sizing: border-box prevents this issue.
No. Disabling user scaling with user-scalable=no or maximum-scale=1.0 violates WCAG 2.1 accessibility guidelines because it prevents visually impaired users from magnifying text and imagery.
No. All viewport dimensions, visual viewport zoom scale telemetry, and user-agent classifications are parsed 100% locally in your client browser memory sandbox with zero network requests.

Related Screen & Device Tools

DPR Checker → Phone DPI Calculator → Touch Screen Test → Screen Size Calculator →