Mobile Viewer Free browser extension

iPhone 17 Screen size & website preview

Check tall navigation at 402 × 874 CSS pixels. Enter this iPhone 17 reference size in Custom device and compare your website with a shorter phone.

Custom device setup

Install extensionChrome Web StoreFree

Free browser extension · No account required · Runs on your computer

Works with
  • Chrome
  • Edge
  • Opera
  • Brave
  • 402 × 874 CSS px
  • Side-by-side comparison
  • Selected-device PNG
iPhone 17 product range pictured in Apple specifications
Device image: Apple ↗

The iPhone 17 has a 6.3-inch display with a 1206 × 2622-pixel physical resolution in portrait order. For a website layout check, start with the 402 × 874 CSS-pixel configuration below. Keep screen pixels and CSS layout space separate, then use the practical test to inspect your own page.

Website configuration
402 × 874 CSS pxCustom configuration
Physical display
6.3 inches1206 × 2622 hardware pixels
Reference scale
3×Custom preview sets width and height

iPhone 17 dimensions at a glance

Hardware specifications below come from the manufacturer. The CSS dimensions and DPR identify a custom reference rectangle, calculated using the display resolution and a 3× scale. They do not describe every browser state on the phone.

iPhone 17: distinguish the units
MeasurementValueUse it for
Display diagonal6.3 inchesPhysical screen comparison
Physical screen resolution1206 × 2622 pixelsManufacturer hardware reference
Portrait website configuration402 × 874 CSS pxResponsive layout checks
Reference scale3×Used to derive the CSS rectangle; not a custom-panel setting
Landscape rectangle874 × 402 CSS pxA wider, shorter layout check
Mobile Viewer setupCustom configurationEnter width and height in Custom device, then Apply
iPhone 17 portrait CSS rectangle 402 × 874, separately labeled from 1206 × 2622 physical screen pixels
Reference diagram, not an extension screenshot. CSS layout space and physical display pixels use different units; the shape is illustrative.

What the iPhone 17 screen resolution means for CSS

At a 3× reference scale, divide each physical dimension by 3 to obtain 402 × 874. This is a useful CSS starting rectangle. A 1 px CSS border is not necessarily a single physical display pixel.

Safari controls and the on-screen keyboard can change the visible viewport. The full screen rectangle is therefore different from the space a visitor sees at every moment. Check shorter heights as well, and verify Safari-specific behavior on an actual iPhone or an appropriate testing service.

Copy-ready website code for the iPhone 17 format

Start with the 402 CSS-pixel configuration as a test case, then choose breakpoints where your content needs them. These examples describe layout conditions; they do not identify a unique iPhone 17. Expand the example you need and copy its code.

The placeholder image files and component classes below belong to your own project. Replace them before use. Keep zoom enabled and test the result above and below the selected width.

HTML · start with the CSS viewport

Let the browser use its device width for layout. Add viewport-fit=cover only when you also handle edge-to-edge safe areas.

<meta name="viewport" content="width=device-width, initial-scale=1">
CSS · inspect the layout at 402 px and below

An example content breakpoint for stacked product actions. Other devices and resized desktop windows can match the same condition.

@media (max-width: 402px) {
  .product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
  }
}
JavaScript · record the actual browser state

Read these values in the target browser when reproducing a finding. Visual viewport height may change when the browser UI or keyboard changes.

const viewport = {
  layoutWidth: document.documentElement.clientWidth,
  layoutHeight: document.documentElement.clientHeight,
  visualWidth: window.visualViewport?.width,
  visualHeight: window.visualViewport?.height,
  devicePixelRatio: window.devicePixelRatio,
};
console.table(viewport);
CSS · a density condition, not a phone detector

This condition matches environments at or above 3 dppx. For this custom entry it uses the reference scale, not an asserted custom-preview DPR. Use responsive image selection for photographs; a density query alone does not guarantee an appropriate image size.

@media (min-resolution: 3dppx) {
  .brand-mark {
    /* Use a vector asset or a suitable high-density source. */
    background-image: url("/images/brand-mark.svg");
  }
}
HTML · let the browser choose a sharper product image

The sizes rule describes the rendered image width, while srcset provides source widths. Replace the example sizes and files to match your real component.

<img
  src="/images/product-480.jpg"
  srcset="/images/product-480.jpg 480w,
          /images/product-960.jpg 960w,
          /images/product-1440.jpg 1440w"
  sizes="(max-width: 402px) calc(100vw - 32px), 480px"
  width="480" height="600"
  alt="Describe the product and relevant visual details">
Tailwind CSS v4 · an optional 402 px checkpoint

At the default 16 px root size, 25.125rem corresponds to 402px. Keep custom breakpoints in rem alongside Tailwind’s default units. This illustrative checkpoint is not a requirement to name a breakpoint after every device.

@import "tailwindcss";

@theme {
  --breakpoint-phone-check: 25.125rem;
}

/* Example markup: */
/* <div class="grid grid-cols-1 phone-check:grid-cols-2">…</div> */

Safe areas, browser controls and fixed actions

This custom configuration specifies width and height. It does not provide a measured safe-area profile for the named model. Use browser-provided safe-area variables and verify the result on the target device.

For an edge-to-edge page, protect important content on every side and give a fixed bottom action its own padding. Keep ordinary spacing when the environment inset is zero. A drawn notch is not evidence that your real browser will expose a particular env() value.

HTML + CSS · keep an edge-to-edge action inside the safe area

Use with an edge-to-edge layout. Reserve the actual height of your fixed action in the page content. Confirm env() values and keyboard interaction on the target browser; the example does not hardcode a model-specific inset.

<meta name="viewport"
      content="width=device-width, initial-scale=1, viewport-fit=cover">

<style>
  :root { --action-height: 5rem; } /* Match your actual control. */
  .page-content {
    padding-left: max(1rem, env(safe-area-inset-left, 0px));
    padding-right: max(1rem, env(safe-area-inset-right, 0px));
    padding-bottom: calc(var(--action-height) + env(safe-area-inset-bottom, 0px));
  }
  .fixed-action {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    padding: 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }
</style>

User-Agent: the preset fixture and the browser you are testing

There is no built-in model-specific User-Agent for this custom entry. Read navigator.userAgent on the actual target browser when you need a log reference; do not invent a model-specific string from the screen dimensions.

User-Agent strings can be reduced or changed, and iPhones do not reliably expose the exact hardware model through them. A mobile User-Agent also does not replace Chrome’s rendering engine with Safari. Prefer feature detection for application behavior and keep the browser/version with a reproducible issue report.

JavaScript · record the target browser User-Agent

Useful as a configuration or log reference, not as a reliable device identity test.

navigator.userAgent;

A 402 px custom layout and tall navigation

Create a 402 × 874 custom configuration. Open a long navigation menu and confirm that its final link and close control remain reachable. Reduce the custom height for another pass; matching the screen rectangle alone does not reproduce Safari’s visible browser area.

Use the same content and page state in each view. A longer title in one preview can otherwise look like a device difference. Zoom the device frames to fit your monitor without changing the chosen CSS dimensions.

Look

Inspect text wrapping, the main action and any content that reaches the right edge. Open the menu or dialog involved in your task.

Change one thing

Compare the neighboring width or rotate a preview. Keep the content fixed so the layout difference is easy to explain.

Keep evidence

Save a PNG of the selected device or a short recording. Include width, height, orientation and the steps that lead to the result.

Set the iPhone 17 reference rectangle with the real width and height controls. This capture is before Apply; match 402 × 874 and check the long menu after applying the size. The custom panel does not offer a DPR field.

Mobile Viewer in use

Scroll the image to inspect the details.

Open full original

Compare nearby presets before calling the layout finished

These are actual Mobile Viewer configurations close to 402 CSS px, selected by width and then height. A nearby width can expose a breakpoint transition; the same width with a different height can expose an unreachable menu or dialog action.

iPhone 16 Pro, iPhone 18 Pro share the width, height and reference scale shown in this guide. That can reduce repeated geometry checks, but it does not establish identical browser engines, content, settings or real-device behavior.

iPhone 17
402 × 874 CSS px
3× reference scale
iPhone SE
375 × 667 CSS px
2× preset DPR

27 CSS px difference in width. Check whether your component changes between these sizes.

CSS rectangle diagrams at 1:5 scale. In Mobile Viewer, add these configurations beside your desktop page and repeat the task above. Use custom width and height for a configuration without a named preset.

Nearby built-in configurations, not traffic share
PresetPortrait CSS pxDPRWidth difference
iPhone 16 Pro402 × 87430 px
iPhone 18 Pro402 × 87430 px
Xiaomi 11i393 × 8732.75-9 px
Pixel 5393 × 8512.75-9 px

Set up this iPhone 17 website preview

This model does not have a named built-in preset in the current catalogue. Install Mobile Viewer, open your website and choose Custom device. Enter width 402 and height 874, apply the dimensions and keep the configuration clearly named. The custom panel sets width and height; it does not offer a DPR field. The 3× reference calculation above does not assert the resulting preview DPR or reproduce the complete model.

Follow the page task above, make the CSS change you need and repeat the same check. For a browser-specific fault, keep the desktop finding as a lead and confirm it in the target browser.

Frequently asked questions

What is the iPhone 17 screen size?

The display diagonal is 6.3 inches; its physical resolution is 1206 × 2622 pixels in portrait order. For this website check, use the separately labeled 402 × 874 CSS configuration.

Is iPhone 17 a built-in Mobile Viewer preset?

No. Use the custom configuration shown in this guide. It is a website layout starting point, not a claim that this named model is built in.

Does this preview test the real mobile browser?

The page renders in desktop Chrome. Use it to review layout and supported interactions at the chosen size; verify iOS Safari, browser controls and keyboard in a real device environment.

Which CSS media query targets the iPhone 17?

CSS queries test conditions such as width, height and resolution, not a unique phone identity. The 402 px example above helps inspect this layout format and narrower windows. Choose breakpoints from your content and test nearby widths too.

What does the 3× DPR value mean?

DPR describes a scale along each dimension; the reference value here is 3. At 2×, for example, a square CSS pixel can correspond to a 2 by 2 device-pixel region. Fractional DPR, browser zoom and rasterization add further details. DPR is different from physical pixels per inch and does not identify a unique model.

Why can the visible viewport height change while scrolling?

Browser controls can expand or collapse, and a software keyboard can change the visual viewport. Record both layout and visual viewport measurements when height is involved in an issue; the preset rectangle does not describe every real browser state.

Can I test a localhost development page at this size?

Yes. Open localhost or 127.0.0.1 in desktop Chrome and start Mobile Viewer. For a non-local site use HTTPS. Compare the same content in each view and keep the configuration with your finding.

Watch the Mobile Viewer product demo.

Try this size on your own website

Open your page at 402 × 874, compare one neighboring width and follow the action your visitors need. Start with the free Mobile Viewer Chrome extension.

Install extensionChrome Web StoreFree

Free browser extension · No account required · Runs on your computer