User Rating 0.0
Total Usage 0 times
Category CSS Tools
Note: Many major sites (Google, Apple) block iframes via X-Frame-Options.
Viewport: 390 x 844
DPR: 3.0
Scale: 100%
Is this tool helpful?

Your feedback helps us improve.

About

Responsive design is not optional. Modern web traffic is dominated by mobile devices with varying aspect ratios and pixel densities. A design that functions on a 4K monitor may break completely on a foldable smartphone or a budget tablet. This tool simulates the viewport dimensions of specific hardware to verify CSS media queries and layout flexibility.

Development environments often differ from production reality. While browser developer tools offer simulation, a standalone environment allows for quick checks of specific URLs and side-by-side comparisons without altering browser internals. This simulator calculates the precise CSS Width and CSS Height required for targeting breakpoints. It handles the translation between physical device pixels and logical viewport pixels using the Device Pixel Ratio (DPR).

Important Constraint: Many high-traffic websites (Google, Amazon) implement an X-Frame-Options header set to SAMEORIGIN or DENY. This security protocol prevents their pages from loading inside an iframe. This tool is engineered for developers testing their own projects, local servers (localhost), or staging environments where these headers can be controlled.

responsive design viewport tester media queries css debugging mobile view

Formulas

Understanding the relationship between physical hardware pixels and the CSS pixels used in media queries requires the Device Pixel Ratio (DPR).

CSS_width = Physical_widthDPR

When calculating the diagonal size in inches for density (PPI) estimations, we use the Pythagorean theorem on the physical resolution:

Diagonal = w2 + h2

The scale factor for visualization ensures the viewport fits within the available monitor space while preserving the aspect ratio:

Scale = minContainer_widthDevice_width, 1

Reference Data

Device NameLogical Width (CSS px)Logical Height (CSS px)DPR (Density)Physical Size
Apple iPhone 14 Pro Max4309323.06.7"
Apple iPhone 14 / 133908443.06.1"
Apple iPhone SE (3rd Gen)3756672.04.7"
Google Pixel 7 Pro4128922.66.7"
Google Pixel 6a4129152.66.1"
Samsung Galaxy S23 Ultra4129153.06.8"
Samsung Galaxy Z Fold 4 (Unfolded)76810763.07.6"
Samsung Galaxy Z Fold 4 (Folded)3739023.06.2"
iPad Pro 12.9" (6th Gen)102413662.012.9"
iPad Air (5th Gen)82011802.010.9"
iPad Mini (6th Gen)74411332.08.3"
Surface Pro 891213682.013.0"
MacBook Air (M2)14709562.013.6"
Desktop 1080p192010801.024"+
Desktop 1440p (2K)256014401.027"+
Desktop 4K (UHD)384021601.032"+
Apple Watch Ultra1922422.049mm

Frequently Asked Questions

This is a security feature, not a bug. Major websites like Google, Facebook, and banking portals send an HTTP response header called X-Frame-Options set to SAMEORIGIN. This tells the browser to block the site from being displayed inside an iframe on a different domain. This tool works best for testing your own websites, localhost projects, or sites that do not enforce this restriction.
No. This tool visualizes layout dimensions and aspect ratios. It simulates the viewport size (CSS pixels). It does not emulate hardware specific behaviors like touch gestures, GPS latency, or network throttling. For full hardware emulation, use browser DevTools or a physical device lab.
If your local server is running (e.g., http://localhost:3000), simply enter that URL into the input field. Ensure your local server does not have strict Content-Security-Policy (CSP) headers that block embedding. If it fails, check your browser console for mixed-content errors (trying to load HTTP localhost inside an HTTPS tool).
Physical resolution refers to the actual number of LEDs/pixels on the screen matrix (e.g., 1170x2532 on an iPhone 12). Logical resolution (CSS pixels) is what the browser sees (e.g., 390x844). The browser scales content up by the Device Pixel Ratio (DPR) so text remains readable on high-density screens.