iPhoneiOS · phone · 2025

iPhone 17 viewport size

402 × 874CSS px · 3× DPR · 1206×2622 physical

The iPhone 17 gives web pages a 402 × 874 CSS pixel viewport in portrait. That’s the width your layout and media queries actually see, not the 1206 × 2622 physical pixels of the screen: with a device pixel ratio of 3, every CSS pixel is 3 × 3 real pixels.

CSS viewport (portrait)402 × 874what web pages get
Landscape874 × 402phones and tablets turned sideways
Device pixel ratio3×1 CSS px = 3 × 3 screen pixels
Physical resolution1206 × 26226.3″ screen
Visible in the browser402 × 718Safari (iOS 26), first load
Released2025iOS phone

See your site on an iPhone 17

Paste your address (or localhost:3000). doesitfit shows it at exactly 402 × 874, with Safari (iOS 26)’s bars if you want them, and tells you if anything spills.

Free, no sign-up. Or ask Claude, ChatGPT or Codex to check it.

What a web page actually sees

The full viewport is 402 × 874, but the browser’s own bars take some of it. In Safari (iOS 26) a page gets about 402 × 718 on first load (62px status bar and Safari’s 94px bottom tab bar on first load; the bars shrink when you scroll). That’s your real “above the fold”. Use 100dvh instead of 100vh for full-height sections, or they’ll hide behind the toolbar (why).

SettingWidthHeight
Full viewport (portrait)402px874px
Visible on first load (Safari (iOS 26))402px718px
Landscape (full)874px402px

What it means for your CSS

Breakpoints

At 402px: Tailwind uses base styles only (below sm, 640px); Bootstrap uses xs. In landscape (874px): Tailwind uses md (sm: md: styles apply), Bootstrap md.

Tailwind breakpoints on real devices

Content width

With 16px of padding on each side your text column is 370px; with 24px it’s 354px. Text closer than 8px to the edge looks cramped (more).

Sharp images

A full-width image needs about 1206px of real pixels (402 × 3).

<img src="hero-1206.jpg"
  srcset="hero-800.jpg 800w, hero-1206.jpg 1206w"
  sizes="100vw" alt="…">

Styles for this width

Content-first breakpoints beat device lists, but if something breaks at this width:

@media (max-width: 402px) {
  /* screens 402px wide and narrower */
}

How common is 402 × 874?

402 × 874 isn’t in StatCounter’s top lists for Aug 2026 on its own, but other devices share it (below), and nearby sizes behave the same way. See the most common screen sizes.

Same viewport:

Close in size:

Compare:

Everything about the 402 × 874 viewport · All devices 402px wide · All iPhone sizes

Questions people ask

What is the viewport size of the iPhone 17?

402 × 874 CSS pixels in portrait (874 × 402 in landscape), with a device pixel ratio of 3. The screen itself is 1206 × 2622 physical pixels.

How much of the iPhone 17 screen does a web page get in Safari?

About 402 × 718 on first load: the 62px status bar and Safari’s 94px bottom tab bar on first load; the bars shrink when you scroll. Design your first screen for that height, not the full 874px.

Which CSS breakpoint does the iPhone 17 fall into?

At 402px wide, Tailwind CSS uses base styles only (below sm, 640px) and Bootstrap uses its xs tier. In landscape (874px) Tailwind uses md (sm: md: styles apply).

How wide should images be for the iPhone 17?

A full-width image needs about 1206px of real pixels (402 CSS px × DPR 3) to look sharp. Use srcset so smaller screens don’t download it.

How can I test my website on an iPhone 17 without one?

Open doesitfit.lol, paste your address (localhost works too) and pick the iPhone 17. It shows your site at exactly 402 × 874 CSS pixels and flags anything that spills past the edge.

Guides that help

About these numbers

Confidence: High: confirmed by more than one independent source.

Sources include DeviceAtlas, Chrome DevTools device list (EmulatedDevices.ts), iosref.com, ios-resolution.com. Researched September 2026.