Screen & Viewport Info.
See your live viewport size, screen resolution, pixel ratio, active CSS breakpoints and media features.
Runs in your browserViewport
–
CSS pixels, as media queries see it
Device pixel ratio
–
physical pixels per CSS pixel
Tailwind breakpoint
–
resize the window to watch it change
| Framework | Breakpoint | Min width | Active |
|---|
About Screen & Viewport Info
Screen & Viewport Info answers "what size is this window, really?" while you work on a responsive layout. The page reads your browser live and updates as you resize the window or rotate a phone: the viewport in CSS pixels, which is the width media queries see, the full screen and available screen size, the device pixel ratio, the same sizes in physical device pixels, the aspect ratio and the orientation. A breakpoint table shows which Tailwind CSS, Bootstrap 5 and Material UI breakpoint is active right now, so you can tell at a glance whether you are in md or lg. The media features panel reports the preferences your device exposes to CSS, including prefers-color-scheme, prefers-reduced-motion, prefers-contrast, pointer and hover capability, color gamut and dynamic range, which helps when a dark mode or a hover effect does not trigger on a test device. For example, an iPhone 15 reports a 393 by 852 viewport at a pixel ratio of 3, which is 1179 by 2556 device pixels and below Tailwind's sm breakpoint. Common surprises are browser zoom changing both the viewport width and the pixel ratio, scrollbars taking width from the viewport on desktop, and mobile toolbars changing the height while you scroll. Media query snippets for the current width are ready to copy. The values are read locally and nothing is sent anywhere.
How to Use
- Open the page; the values update live.
- Resize the window or rotate your device to watch the viewport and breakpoint change.
- Copy a media query for the current width or share the values in a bug report.
Frequently Asked Questions
What is the difference between viewport and screen size?
The viewport is the area of the page inside the browser window, which media queries use. The screen size is the whole display, including space taken by other windows and the browser's own toolbars.
What is device pixel ratio?
The number of physical pixels per CSS pixel. A ratio of 2 or 3 means a high-density (Retina) display, which needs 2x or 3x images to look sharp.
Why does zooming change the viewport width?
Browser zoom enlarges CSS pixels, so fewer of them fit in the window and the device pixel ratio goes up by the same factor.
Is any information collected?
No. Everything is read and shown in your browser; the page sends nothing.
Related Tools
Press any key to see event.key, event.code, keyCode, location and modifiers, with a ready keydown handler.
Experiment with flexbox and CSS grid container properties on live boxes and copy the CSS or Tailwind classes.
Check text and UI color contrast against WCAG 2.2 AA and AAA, with the closest passing colors.
Calculate and compare CSS selector specificity, including :is(), :not(), :has(), :where() and nth-child(of S).
Information about your current IP address.
Set each corner radius, including elliptical corners, and copy the shortest CSS or Tailwind classes.