Phone · iOS
iPhone XR viewport size
The iPhone XR has a viewport of 414 × 896 CSS pixels and a device pixel ratio of 2, which makes about 828 × 1792 physical pixels.
Viewport (portrait)
414 × 896
Landscape
896 × 414
Device pixel ratio
2
Screen resolution
828 × 1792
Screenshot a website on the iPhone XR
CSS for the iPhone XR
Target this screen size in CSS (portrait):
@media (max-width: 414px) {
/* iPhone XR and smaller */
}
@media (min-resolution: 2dppx) {
/* high-density screens: serve sharper images */
}Design for ranges, not single devices: many phones share the same viewport width (for example 414 px).
User agent
The user agent Chrome DevTools uses when it emulates the iPhone XR:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Mobile/15E148 Safari/604.1Test your site on the iPhone XR
In Chrome, open DevTools (F12), turn on device mode (Ctrl+Shift+M or ⌘+Shift+M) and pick the device from the Dimensions menu, or use the screenshot tool above to capture any page at this size.
Data from the device list built into Chrome DevTools (devtools-frontend, BSD license).
Frequently asked questions
What is the viewport size of the iPhone XR?
What is the screen resolution of the iPhone XR?
Why is the viewport smaller than the screen resolution?
Other devices
Screenshot API
Take screenshots from your code
screenshotbase renders any website in a real browser and returns the image: full page or viewport, any device size, retina, from 100+ countries, with cookie banners and ads hidden.
Read the docs300 free screenshots every month. No credit card required.
GET https://api.screenshotbase.com/v1/take?url=https://example.com&viewport_width=414&viewport_height=896&device_scale_factor=2
# Response: the image (PNG, JPG, WebP or GIF)
curl -G "https://api.screenshotbase.com/v1/take" \
--data-urlencode "url=https://example.com" \
-d viewport_width=1280 -d viewport_height=800 \
-d format=png \
-H "apikey: YOUR-API-KEY" \
-o screenshot.png