Browser Resolution Tester
Professional-grade diagnostic tool for checking Viewport dimensions, Device Pixel Ratio (DPR), Screen Resolution, and generating CSS Media Queries in real-time.
@media (min-width: 0px) { ... }
About
In the landscape of modern web development, the distinction between physical hardware pixels and CSS logical pixels is critical. A Viewport represents the visible area of a web page, which often differs from the monitor's physical resolution due to scaling factors like the Device Pixel Ratio (DPR). Precise measurement of these values is mandatory for implementing fluid layouts and ensuring quality assurance across a fragmented device ecosystem.
This utility provides instantaneous, real-time telemetry of the browser environment. It dissects the window and screen objects to expose granular metrics: viewport geometry, color depth, orientation, and aspect ratios. Unlike basic resize listeners, this tool calculates the Greatest Common Divisor (GCD) to determine simplified aspect ratios and compares current dimensions against a verified database of industry-standard devices.
Formulas
The Aspect Ratio (R) is derived by simplifying the fraction of width (W) to height (H). This requires finding the Greatest Common Divisor (gcd).
The simplified width component ws and height component hs are calculated as:
ws = Wgcd(W, H), hs = Hgcd(W, H)
CSS Pixels (pxcss) vs Physical Pixels (pxphys) relationship via Device Pixel Ratio (dpr):
pxphys ≈ pxcss × dpr
Reference Data
| Device Name | Viewport (WxH) | DPR | Screen Size |
|---|---|---|---|
| iPhone 15 Pro Max | 430 × 932 | 3.0 | 6.7″ |
| iPhone 15 / 15 Pro | 393 × 852 | 3.0 | 6.1″ |
| iPhone 14 Plus | 428 × 926 | 3.0 | 6.7″ |
| iPhone 13 / 14 | 390 × 844 | 3.0 | 6.1″ |
| iPhone SE (3rd Gen) | 375 × 667 | 2.0 | 4.7″ |
| iPad Pro 12.9″ | 1024 × 1366 | 2.0 | 12.9″ |
| iPad Air (5th Gen) | 820 × 1180 | 2.0 | 10.9″ |
| iPad Mini (6th Gen) | 744 × 1133 | 2.0 | 8.3″ |
| Samsung Galaxy S24 Ultra | 412 × 915 | 3.5 | 6.8″ |
| Samsung Galaxy S23 | 360 × 780 | 3.0 | 6.1″ |
| Google Pixel 8 Pro | 412 × 915 | 3.5 | 6.7″ |
| Google Pixel 7 | 412 × 915 | 3.0 | 6.3″ |
| Desktop FHD | 1920 × 1080 | 1.0 | 24″+ |
| Desktop 4K UHD | 3840 × 2160 | 1.0+ | 27″+ |
| MacBook Air M2 | 1440 × 900 | 2.0 | 13.6″ |
| MacBook Pro 16″ | 1728 × 1117 | 2.0 | 16.2″ |
| Surface Pro 9 | 1440 × 960 | 2.0 | 13″ |