2-170%
Window.devicePixelRatio
Baseline 2026Newly available
Since March 2026, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Read-only property that returns the ratio of the (vertical) size of one physical pixel on the current display device to the size of one CSS pixel.
IE
Edge
Firefox
Chrome
Safari
Safari iOS
Opera Mini
Chrome Android
Android Browser
Samsung Internet
✓Supported
✗Not supported
Partial support