devicePixelRatio

Newly Available (since 2026-03-24)
Expected to be Widely Available on 2028-09-24

The window.devicePixelRatio property is the ratio of the size of one CSS pixel to the vertical size of one physical pixel on the current display device.

Browser support (view on caniuse.com)

  • Chrome 1 Released on 2008-12-11
  • Chrome Android 18 Released on 2012-06-27
  • Edge 12 Released on 2015-07-29
  • Firefox 18 Released on 2013-01-08
  • Firefox for Android 18 Released on 2013-01-08
  • Safari 26.4 Released on 2026-03-24
  • Safari on iOS 26.4 Released on 2026-03-24

Need this feature?
Leave a 👍 on the feedback issue
Don't forget to also leave a comment explaining your specific use case.