Blog

How to check device pixel ratio in your browser

Check your browser's device pixel ratio, understand what the number means, and see how zoom, display scaling, and multiple screens affect it.

Ryan MitchellHardware tests 4 min read

A website looks blurry, too large, or different on two screens, and you want to check your browser's device pixel ratio. This number describes how browser pixels relate to the pixels on your display, but it can change with zoom, display scaling, and which screen the browser is using.

You can read the exact value directly in your browser's developer console. The System Info tool can also show screen information available to the browser, which is useful context when you compare displays.

Check the device pixel ratio

  1. Open System Info and review the screen information shown for your device. This helps you note which display and resolution the browser can see.
  2. Open a regular webpage in the browser and open its developer tools. In Chrome or Edge on Windows, press Ctrl + Shift + J. On a Mac, press Command + Option + J. Other browsers may use a different shortcut.
  3. Select the Console tab if it is not already open. Click the input line and type window.devicePixelRatio, then press Enter.
  4. Read the number returned, such as 1, 1.25, or 2. That is the device pixel ratio for the current browser window and display.
  5. If you use more than one monitor, move the browser window to another screen and run the expression again. Keep the window at the same zoom level for a useful comparison.

Type only the expression shown above. You do not need to paste a script or install anything. The console evaluates it in the page you have open.

What the result means

The value is 1

At that moment, one device pixel corresponds to one CSS pixel in the browser's page layout. CSS pixels are the units websites use to size text and page elements. A value of 1 does not mean the monitor has a particular physical resolution, and it does not measure sharpness by itself.

The value is 2

There are two device pixels for each CSS pixel in each direction. A page element that is 100 CSS pixels wide can use about 200 device pixels across. On a high-density screen, this lets websites draw details more sharply while keeping buttons and text at a comfortable size.

The value is a fraction, such as 1.25 or 1.5

Fractional values are normal. They can result from operating system display scaling, browser zoom, or the screen and browser combination. A fraction does not automatically signal a display problem.

The value changes when you zoom or move the window

The number belongs to the browser's current view, not just to the computer. Browser zoom can affect the reported value, and displays with different scaling can produce different results. A change after moving the window between monitors is expected on many setups.

System Info shows screen dimensions, but not this number

The tool reports screen details available to the browser, but screen dimensions and device pixel ratio are different values. Use the developer console expression for the exact browser-reported ratio. A browser-based check also cannot prove the physical pixel layout or condition of the panel.

How to get a consistent reading

  1. Reset browser zoom. Press Ctrl + 0 on Windows or Command + 0 on a Mac to return the page to its default zoom, then run the expression again.
  2. Keep the browser on one display. If you are comparing values, use the same screen and keep the window fully on it. A window spanning two monitors can make the result confusing.
  3. Check the operating system's display scale. On Windows 11, open Settings › System › Display and review Scale and Display resolution. On macOS, open System Settings › Displays and review the available resolution or scaling options. These settings affect how content is sized on screen.
  4. Compare the same browser and page. Different browser engines, zoom levels, and windows can report different values. Run the same expression in the same browser with the same zoom when comparing results.
  5. Reload after changing a display setting. Some pages read the ratio only when they load or when a screen changes. Reload the page and check again if the displayed layout did not update.

What this number cannot tell you

Device pixel ratio is not the same as screen resolution, physical pixel size, or pixels per inch. It also cannot tell whether a screen has dead pixels, blur, or a scaling defect. If the ratio looks ordinary but the image itself seems wrong, check the display resolution and scaling in system settings, then test the panel separately.

The value comes from the browser on your device. It is a useful clue about how a webpage is being drawn, not a complete measurement of your monitor.