RESPONSIVE

How to inspect element on an iPhone

To inspect element on an iPhone, turn on Web Inspector in Settings > Apps > Safari > Advanced, connect the iPhone to a Mac with a cable and open the page in Safari. On the Mac, open Safari’s Develop menu, choose your iPhone, then the page. The iPhone itself has no built-in Inspect Element.

“Inspect an iPhone from a Mac.” A phone with Web Inspector switched on is cabled to a laptop, where a Develop menu opens a code panel linked to a button on the phone’s page.
The tools open on the Mac; the page stays on the iPhone.

In short

  • Apple’s way needs a Mac: the tools open there, the page stays on the iPhone
  • A cable is needed the first time; after that it can work over Wi-Fi
  • Chrome on iPhone can be inspected the same way
  • With no computer, a Safari extension gives a smaller set of tools
On this page8
  1. Step by step
  2. Ways to inspect a page on an iPhone
  3. Inspect without the cable
  4. Inspect Chrome on an iPhone
  5. Inspect element on iPhone without a computer
  6. Check a page at iPhone size instead
  7. When the iPhone doesn’t show up
  8. Questions

Step by step

  1. Turn on Web Inspector

    On the iPhone, open Settings > Apps > Safari > Advanced and turn on Web Inspector.

  2. Turn on the Develop menu

    On the Mac, open Safari > Settings > Advanced and tick Show features for web developers.

  3. Connect the iPhone

    Plug the iPhone into the Mac with a cable, unlock it and tap Trust if it asks.

  4. Open the page

    Open the page in Safari on the iPhone and leave it on screen.

  5. Pick it on the Mac

    In Safari on the Mac, open Develop, choose your iPhone, then the page. Web Inspector opens.

Ways to inspect a page on an iPhone

What each way needs, and what it gives you
WayWhat you needWhat you get
Safari’s Web InspectorA Mac and a cable (Wi-Fi after the first time)The full tools: elements, styles, console and network
Chrome on iPhone, inspected from a MacThe same, plus a setting in ChromeThe same tools, for Chrome’s tabs
A Safari extension on the iPhoneAn app from the App StoreA small panel on the phone itself
chrome://inspect in Chrome on iPhoneNothing elseConsole messages only
Responsive Design Mode on a computerSafari on a Mac, or device mode in ChromeThe page at iPhone size, not a real iPhone
Responsive viewer extension in the Sitepeel interface
Responsive viewer extension in actionExplore the tool

Inspect without the cable

  • Connect by cable once, as in the steps above.
  • On the Mac, open Develop, point at your iPhone and choose Connect via Network.
  • Unplug the cable. The iPhone stays in the Develop menu while both are on the same network.
  • Closing the tab on the iPhone closes its inspector window on the Mac.

Inspect Chrome on an iPhone

Chrome on iPhone shows pages with Apple’s WebKit, as Safari does, so the Mac’s Web Inspector can read its tabs too.

  • In Chrome on the iPhone, open Settings > Content Settings, turn on Web Inspector and restart Chrome.
  • Connect the iPhone to the Mac and open the page in Chrome.
  • In Safari on the Mac, open Develop, choose the iPhone and pick the page.
  • It needs iOS 16.4 or later and Chrome 115 or later.
  • For console messages alone, open chrome://inspect in a Chrome tab, tap Start Logging and use the page in another tab.

Inspect element on iPhone without a computer

Safari on iPhone has no Inspect Element and no way to view a page’s source. Safari extensions from the App Store, such as Web Inspector, add a small panel for a page’s elements and console.

  • You give the extension access to the pages you inspect, so check who makes it first.
  • The panel is small, and it does less than the tools on a Mac.
  • Apple’s own Web Inspector needs a Mac. Windows and Linux can’t run it.

Check a page at iPhone size instead

If the question is how a layout looks on an iPhone, you may not need the phone. Paste the link into Sitepeel’s free responsive checker to see the page on phones, tablets and laptops side by side. It shows screen sizes, not a real iPhone, so test touch and the keyboard on the device.

When the iPhone doesn’t show up

Common Web Inspector problems and their fixes
ProblemFix
No Develop menu on the MacTick Show features for web developers in Safari > Settings > Advanced
The iPhone isn’t in the Develop menuUnlock it, tap Trust, and check Web Inspector is on in its Settings
The iPhone is listed with no pagesOpen the page in Safari on the iPhone and leave it on screen
Chrome’s tabs are missingTurn on Web Inspector in Chrome’s Content Settings, then restart Chrome
The inspector window closedThe tab was closed on the iPhone. Open it and pick it again

Questions

How can I inspect an element on my iPhone without using a computer?

Safari on iPhone has no Inspect Element. A Safari extension from the App Store, such as Web Inspector, adds a small elements and console panel. For the full tools, connect the iPhone to a Mac and use Safari’s Develop menu.

Is there a way to use Inspect Element on mobile?

Yes, with a computer. Pages on an iPhone are inspected from Safari on a Mac. Pages on Android are inspected from Chrome on any computer, at chrome://inspect. On the phone alone you get only small add-on tools.

Can I inspect element on an iPhone with a Windows PC?

Not with Apple’s tools: Web Inspector is part of Safari on a Mac. On Windows, use device mode in Chrome or Edge to see the page at iPhone size, or a Safari extension on the iPhone itself.

Can I view an HTML file on my iPhone?

Yes. Tap an .html file in the Files app and it opens as a page. To read the code of a live page, inspect it from a Mac: Safari on iPhone has no view-source option.

Does inspecting a page on my iPhone change the website?

No. Web Inspector changes only the copy of the page on your iPhone. Other people see the site as it was, and a reload brings your copy back to the original.

TAKE A CLOSER LOOK

Your next starting point is already on the web.

Inspect it. Understand it. Build something of your own.

Add to ChromeFree installTry the free tools