How to test a website on different screen sizes (phone, tablet and desktop)

See a website on an iPhone, a Pixel, an iPad and a laptop side by side, free, including localhost: the sizes worth checking, the breakpoints to look at, and what to check at each.

By · · 5 min read

The Responsive Viewer on a dark stage: one page on an iPhone 14 Pro, an iPad Mini and a laptop, its layout changing with the width.
The short answer: open the Responsive Viewer, type the site's address, and it opens on an iPhone, an iPad and a laptop side by side. Add or turn devices, and type any size. For a quick single size, Chrome's device mode works too: open DevTools and press CtrlShiftM.

Most visits to a website come from phones, but most websites are built on a laptop. The gap shows up as a menu that overlaps the logo at 390 pixels, a table that runs off the side of a tablet, or a button that wraps onto two lines just above a breakpoint. The fix is to look at the page at the sizes people use, before they do.

The sizes worth checking#

A browser lays a page out by its viewport: the width and height in CSS pixels, not the screen's physical pixels. These are the viewports Chrome DevTools lists for common devices, and the ones the Responsive Viewer offers:

DeviceViewportWhy it matters
iPhone SE375 × 667The narrowest phone still in wide use
iPhone 14 Pro393 × 852A typical modern iPhone
Pixel 7412 × 915A typical Android phone
iPhone 14 Pro Max430 × 932The widest phones
iPad Mini768 × 1024Tablets, and where many layouts switch
Laptop1280 × 800A small laptop screen
Desktop1440 × 900A common desktop window

Devices are a starting point, not the goal. A layout changes at its breakpoints, the widths its CSS media queries switch at, so the sizes most likely to break are the ones just either side of each breakpoint. If a site switches at 768 pixels, check 767 and 768.

See every size at once#

Dragging a window narrower shows one size at a time, and it is easy to miss what changed. Seeing the sizes next to each other makes a jump in the layout obvious.

  1. Open the Responsive Viewer. It is free and needs no account.
  2. Type the address, like example.com, and press Enter. The site opens on an iPhone, an iPad Mini and a laptop, each drawn as the device with its status and address bars around the page, so the page gets exactly the viewport shown.
  3. Add devices with the plus on the rail, type any width and height, or turn every device on its side for landscape.
  4. Zoom to fit the tallest device to the window, or show them at 50%, 75% or 100%.

The link keeps the address, so you can bookmark a view or send it to someone. In Chrome or Edge you can install it as an app of its own from the address bar.

Test your localhost while you build#

The Responsive Viewer opens localhost addresses too: type localhost:3000 (or your dev server's port) and every device shows your work in progress. Browsers treat your own computer as secure, so it shows inside the viewer even though the viewer itself is on https. Save a file and press reload on the rail to see every size update.

When a device stays blank#

Many sites tell browsers not to show them inside other pages, with an X-Frame-Options or Content-Security-Policy header. A web page cannot change that, so those sites stay blank in the Responsive Viewer. Your own site on localhost, and most sites you are building, do not send it.

The responsive canvas in the Nitpique extension shows every site: it lifts those headers for its own frames, in that tab only, while it is open. It also reads the page's breakpoints, so it can show one frame per layout and step a frame to the next breakpoint, and it scrolls every frame together.

One size at a time in DevTools#

Every desktop browser has a built-in way to set the page to a device's size, useful when you are already in DevTools:

  • Chrome and Edge: open DevTools, then press CtrlShiftM for the device toolbar, and pick a device or type a size.
  • Firefox: open the Responsive Design Mode from the Tools menu, under Browser Tools.
  • Safari: turn on the Develop menu in Settings, then choose Enter Responsive Design Mode.

These show one size at a time in your own tab. To compare sizes, keep the Responsive Viewer open beside it.

What to look for at each size#

  • Nothing runs off the side: no sideways scroll on a phone
  • The navigation opens and closes, and nothing sits on top of the logo
  • Headings wrap at a sensible word, not one word on a line
  • Buttons and links are at least 24 by 24 pixels, with room between them
  • Images keep their shape and do not crop the important part
  • Tables and code blocks scroll on their own instead of widening the page
  • Text stays readable: about 16 pixels for body text on a phone
  • Just either side of every breakpoint, the layout still holds

Found something? Take a screenshot and mark it up in the Annotator to show what is wrong, or read how to measure spacing on any website to find out by how much.

Try it on this site

More on Design QA: every Design QA article

Read next