Inspect Your Screen Resolution, Viewport & DPR
This utility instantly reveals your browser's viewport dimensions, screen resolution, and Device Pixel Ratio (DPR). Pre-configured with `{"inspectDpr": true}`, it's optimized for web developers and designers needing precise, privacy-centric display metrics without sending any data to a server. All calculations occur locally.
Workflow Checklist
- Verify `window.devicePixelRatio` matches physical display capabilities for asset optimization.
- Confirm responsive CSS media queries for `min-width` and `min-height` against actual viewport dimensions.
- Check if reported screen resolution aligns with your OS display settings (e.g., Mac System Settings > Displays).
- Ensure your website's `meta viewport` tag correctly configures initial scale and width for mobile DPR handling.
Parent Tool & Hub
Step-by-Step Guide: Inspect Your Screen Resolution, Viewport & DPR
Follow these exact steps to complete this workflow locally in your browser without uploading files.
- 1
Open the Inspect Tool
Navigate directly to the `/tools/check-viewport-device-pixel-ratio-retina` URL in your browser to load the pre-configured inspection utility.
Tip: Bookmark this specific URL for instant access to DPR insights. - 2
Observe Real-Time Metrics
The tool immediately displays your current screen resolution, browser viewport dimensions, and the crucial Device Pixel Ratio (DPR) upon page load.
Tip: Note the distinction between logical viewport pixels and physical screen pixels. - 3
Resize Browser Window
Drag your browser window edges to resize it. Observe how the 'Viewport Dimensions' dynamically update, while 'Screen Resolution' remains constant.
Tip: This helps in responsive design testing across various viewport sizes. - 4
Test Device Rotation (Mobile)
On a mobile device, rotate your device from portrait to landscape. The viewport dimensions will update to reflect the new orientation's width and height.
Tip: Crucial for verifying CSS media queries for different orientations. - 5
Check Developer Console
Open your browser's developer console (F12 or Cmd+Option+I) and type `window.devicePixelRatio` for a direct API confirmation of the displayed DPR.
Tip: Cross-reference with the tool's output for robust validation.
Technical Specifications & Preset Reference
| Parameter | Recommended Setting | Why It Matters |
|---|---|---|
| Device Pixel Ratio (DPR) | Varies (e.g., 1, 2, 3) | Indicates the ratio of physical pixels to CSS pixels, crucial for high-resolution (Retina) displays and image asset scaling. |
| Screen Resolution | Native display pixels | Total physical pixel dimensions of your monitor or device screen, independent of browser window size. |
| Viewport Dimensions | Browser window CSS pixels | The current visible area of the web page in CSS pixels, directly impacting responsive layout calculations. |
| Processing Location | Browser-local (Client-side) | Ensures zero data upload, safeguarding sensitive configuration or testing details from third-party servers. |
| Active Preset | `{"inspectDpr": true}` | Pre-configures the tool to immediately display DPR and related metrics without manual input, streamlining the workflow. |
Common Issues & Troubleshooting Fixes
Misinterpreting DPR for image asset sizing
Remember that a DPR of 2 means a 100px CSS image needs a 200px actual image for sharp display on Retina screens. Use `srcset` or `image-set`.
Confusing screen resolution with viewport size
Screen resolution is fixed by your display hardware. Viewport dimensions change with browser window resizing or device orientation, directly affecting responsive layouts.
Inaccurate DPR readings in browser dev tools
Some browser dev tools might report a simulated DPR when in device emulation mode. This tool provides the real, current browser DPR for your actual display.
DPR not updating after display changes
If you change display scaling or connect an external monitor, refresh the page to ensure the browser re-evaluates `window.devicePixelRatio` and updates the display.
Why Run This Workflow Locally in ShowPro?
Unlike remote services that might require screenshots or manual input, this browser-local utility provides instant, real-time DPR, viewport, and screen resolution metrics. There's no data upload, ensuring your testing configurations or sensitive project details never leave your browser, crucial for proprietary development environments or regulated industries like financial services.
Frequently Asked Questions
Why does my DPR show a fractional value like 1.25 or 1.5?
Fractional DPRs occur on some Windows or Linux setups, especially with non-standard display scaling settings. The browser reports the actual ratio it uses for rendering, which might not be a whole number.
Does this tool work in all browsers?
Yes, this tool leverages standard browser APIs like `window.devicePixelRatio`, `window.innerWidth`, `window.innerHeight`, `screen.width`, and `screen.height`, which are universally supported across modern browsers (Chrome, Firefox, Safari, Edge).
Can I use this to test different device DPRs?
This tool reports your current device's actual DPR. To test different DPRs, you'd typically use your browser's developer tools device emulation mode, which can simulate various DPRs and screen sizes.
Is my screen resolution always the same as my viewport size?
No, your screen resolution is the total pixel count of your display. Your viewport size is the current size of your browser window in CSS pixels, which is usually smaller than your screen resolution, especially on desktop.
How does DPR affect image quality on my website?
A higher DPR means your device has more physical pixels per CSS pixel. To ensure crisp images on high-DPR screens (like Retina displays), you need to provide image assets that are proportionally larger (e.g., a 2x image for a DPR of 2).