Viewport & DPR Detector

Show your current viewport size, device pixel ratio, and screen dimensions. Fast, free, and fully client-side.

Viewport Width0px
Viewport Height0px
Device Pixel Ratio1x
Screen Width0px
Screen Height0px

How the Viewport & DPR Detector Works

Displays the viewport width and height from the window inner size, the device pixel ratio, and the full screen dimensions. Viewport values include any visible scrollbar, and all readings refresh when the window is resized. The tool reports values the browser exposes and does not test any page. Runs in your browser and nothing is uploaded.

Usage Example

Checks the exact width a responsive layout receives at a given window size before adjusting a media query breakpoint.

Frequently Asked Questions

Why is the viewport narrower than my screen?

Screen values describe the entire display, while viewport values use the inner size of the browser window, which excludes browser chrome. Viewport values also include any visible scrollbar.

What does the device pixel ratio show?

It is the number of physical device pixels used for each CSS pixel. A ratio of 2 indicates a high-density display, but it does not give the screen resolution on its own.

Does the readout update on resize?

Yes. The values refresh whenever the window is resized, so dragging a window edge updates the width and height shown.

Browse more

See all developer reference guides and interactive utilities.