Apple · iPhone · 2025
iPhone 17 Screen Size & CSS Viewport
Standard iPhone 17 screen dimensions for web developers: 402 × 874 CSS viewport pixels, 1206 × 2622 physical resolution, 3x pixel density.
CSS Viewport
402 × 874
Physical Pixels
1206 × 2622
Pixel Ratio (DPR)
3x (460 PPI)
Screen Size
6.3" (19.5:9)
Safe Area Insets
62px / 34px
Tailwind Prefix
Default (< 640px sm)
6.3-inch 120Hz display with Dynamic Island (62px top safe area) and 34px bottom inset.
Copy-paste CSS
iPhone 17 CSS media queries & safe areas
Use content-based responsive breakpoints first, and reach for these snippets when auditing device-specific edge cases.
Responsive max-width query
/* iPhone 17 Portrait (402x874, 3x) */
@media only screen and (max-width: 402px) {
/* styles for iPhone 17 and narrower viewports */
}Exact device & DPR query
/* Target iPhone 17 specifically (402px width, 3x DPR) */
@media only screen
and (device-width: 402px)
and (device-height: 874px)
and (-webkit-min-device-pixel-ratio: 3) {
/* device-specific overrides */
}Safe-area inset helpers
/* iPhone 17 safe-area padding (top 62px, bottom 34px) */
.sticky-header {
padding-top: env(safe-area-inset-top, 62px);
}
.sticky-footer {
padding-bottom: env(safe-area-inset-bottom, 34px);
}Frontend QA notes
What breaks most often on iPhone 17
Browser environment: iOS Safari (WebKit) · Mobile.
- With the base iPhone moving up to 402px CSS width, still pair it with a 360px Android viewport so older/narrow devices never overflow.
- Use 100dvh for full-screen drawers and onboarding screens to match Safari's dynamic chrome.
- Test touch targets at 44 × 44 CSS pixels minimum per Apple HIG.
Side-by-side
Compare iPhone 17 with nearby devices
Check how viewport width and pixel ratio shift across adjacent models.
| Device | Viewport | Physical | DPR |
|---|---|---|---|
| iPhone 17 | 402 × 874 | 1206 × 2622 | 3x |
| iPhone 17 Pro | 402 × 874 | 1206 × 2622 | 3x |
| iPhone 17 Pro Max | 440 × 956 | 1320 × 2868 | 3x |
| iPhone 16 | 393 × 852 | 1179 × 2556 | 3x |
| iPhone 15 | 393 × 852 | 1179 × 2556 | 3x |
Test iPhone 17 + 50 devices side by side
Stop resizing Chrome DevTools one viewport at a time. Sizzy renders iPhone 17, narrow 360px Android, iPad, and desktop simultaneously with synced scrolling, unified console, and one-click device screenshots.
Questions
iPhone 17 viewport questions
The iPhone 17 CSS viewport size is 402 × 874 pixels in portrait (874 × 402 pixels in landscape).
The iPhone 17 has a physical screen resolution of 1206 × 2622 pixels on a 6.3" display (460 PPI) with a 3x device pixel ratio.
Use @media only screen and (max-width: 402px) for responsive width targeting, or combine (device-width: 402px) and (-webkit-min-device-pixel-ratio: 3) for high-DPI styling.
You can preview your local site at 402 × 874 alongside other phones, tablets, and desktop viewports simultaneously inside Sizzy, with synced scroll, DevTools, and screenshot capture.