How to check device pixel ratio

Device pixel ratio, or DPR, describes the relationship between CSS pixels and device pixels. It can change with display scaling, browser zoom, and the screen currently holding the window.

Check device pixel ratio

Check DPR in a few steps

  1. Open the Device Pixel Ratio Checker in the browser you want to measure.
  2. Read the current devicePixelRatio value.
  3. Move the window to another display or change page zoom if you want to compare environments.
  4. Select Refresh measurements when needed.
  5. Pause live updates before copying a stable snapshot.

What the number means

device pixels per axis = CSS pixels × DPR

At DPR 2, a length of 100 CSS pixels nominally spans 200 device pixels along each axis. The corresponding 100 by 100 CSS-pixel area can cover 200 by 200 device pixels, or four times as many device pixels in total.

DPR100 CSS px nominally spansWhat to remember
1100 device pxOne-to-one nominal mapping
1.25125 device pxFractional ratios are normal
2200 device pxOften needs denser raster assets

Why device pixel ratio changes

  • Operating-system scaling: display scaling can increase the ratio used by the browser.
  • Browser page zoom: changing page zoom may change devicePixelRatio.
  • Multiple displays: moving a window between screens can produce a different value.
  • Pinch zoom: this usually changes visual viewport scale rather than DPR.

Take the measurement in the exact browser, zoom level, and display configuration you are testing.

What DPR does not tell you

Device pixel ratio is not the screen's physical dots per inch, diagonal size, or guaranteed native panel resolution. It is a browser value used in the CSS rendering environment. It also does not mean every CSS edge aligns perfectly with physical pixel boundaries, especially when the ratio is fractional.

How developers use DPR

DPR helps when selecting responsive raster images, sizing a canvas backing store, and diagnosing why a screenshot or bitmap looks soft. Layout should still use CSS pixels. Avoid multiplying normal CSS dimensions by DPR just to make interfaces larger.

Open the Device Pixel Ratio Checker