What is page source?
A web page’s source is the HTML code the server sends to your browser: the text, the tags around it, and links to the styles, scripts and images that make up the page. The browser turns it into what you see. Viewing the source shows what is really on a page, including things you never see, such as the title tag, meta description, structured data and tracking scripts.
How to view page source in each browser
| Browser | How |
|---|---|
| Chrome, Edge (Windows, Linux) | Ctrl + U, or right-click › View page source |
| Chrome, Edge (Mac) | ⌥ + ⌘ + U |
| Firefox | Ctrl + U on Windows and Linux, ⌘ + U on Mac |
| Safari (Mac) | Settings › Advanced › Show features for web developers, then ⌥ + ⌘ + U |
| Chrome on Android | Type view-source: in front of the address |
| Safari on iPhone and iPad | No built-in option: paste the address into the tool above |
What to look for in the source
- SEO tags: search for
<title,name="description",rel="canonical"androbots. - Structured data: search for
application/ld+jsonto find schema markup. - Tracking and ads: search for
gtag,googletagmanageror an ad network’s name to see which scripts load. - Verification codes: check a
google-site-verificationmeta tag is really on the page.
Page source vs Inspect Element
Page source is the original HTML, exactly as the server sent it. Inspect Element (the Elements panel in developer tools) shows the page as it is now, after JavaScript has added, removed or changed parts of it. Search engines and social apps read the original HTML first, so the source is the better test of whether a title, link or tag is really there. Inspect is better for finding why something looks wrong on screen.
Why does the source look empty or different?
- The site is built with JavaScript: many apps send an almost empty page with a
<div id="root">and fill it in later. The source shows only that shell. - All on one line: the HTML is minified to save space. Turn Wrap lines on and use the search box.
- A different page: the address redirected, for example to a login or a country version. The tool shows the final address under the toolbar.
- An error page: the status shown is 403 or 503 when a firewall blocks automated visitors.
Limits
Pages are fetched once from our server, so pages behind a login or a paywall show the logged-out version. The tool follows up to 10 redirects, waits up to 10 seconds, and cuts the source at 1.5 MB, which covers almost all pages; the same address is cached for five minutes. Social sharing tags are easier to check with the Open Graph checker, and links with the link analyzer. To open many pages in tabs at once, use the multiple URL opener.