Get the source code of a page
See the raw HTML a server sends for any public page, as a desktop browser, a phone or Googlebot. Search it, follow the redirects, and get the title, canonical, robots tags and scripts pulled out for you.
- Line numbers, colors and search
- Redirects and status shown
- Copy or download as .html
Response
Enter a URL to start
- RequestWaiting for inputUser agent sent
- Redirects—Each hop checked
- Response—Status and type
- Source—Converted to UTF-8
Page source
Enter a page URL above to see its raw HTML with line numbers, the redirects on the way, and a summary of its title, canonical, robots tags, headings and scripts.
Fair-use limit: 30 fetches per hour and 200 per day for each visitor IP address. Pages are read up to 5 MB.
What page source shows
The HTML document a server sends in answer to a request, before any styling or script runs in the browser.
The server's answer
Every page starts as HTML text: the head with title, meta tags and links to files, and the body with the content and scripts.
Source is not the DOM
Browsers build the DOM from the source, then scripts change it. Inspect Element shows that live result, not the original.
Server or client rendering
Server-rendered pages have their text in the source. Single-page apps may send a nearly empty shell and fill it with JavaScript.
What crawlers read first
Search engines start from this HTML. Googlebot reads the first 2 MB of it, and runs JavaScript later, if at all.
Elements worth checking in the source
The tags the report pulls out, and why each one matters.
| Element | What it is | What to look for |
|---|---|---|
<title> |
The page title shown in browser tabs and often as the search result headline. | One per page, unique and descriptive. The report shows its length. |
<meta name="description"> |
A short summary that search engines may use as the snippet. | Missing or duplicate descriptions are common template bugs. |
<link rel="canonical"> |
The URL the site names as the main version of the page. | Should point to the page itself unless it is a duplicate. |
<meta name="robots"> |
Instructions for crawlers, such as noindex or nofollow. | A stray noindex keeps a page out of search results. |
<meta name="viewport"> |
How the page scales on phones. | Without it, mobile browsers show a zoomed-out desktop layout. |
<link rel="alternate" hreflang> |
Language and region versions of the page. | Each version should list all others and itself. |
<script type="application/ld+json"> |
Structured data, such as Article, Product or FAQPage. | Must describe content that is visible on the page. |
<script src> in <head> |
JavaScript files loaded before the page content. | Without async or defer they block rendering until downloaded. |
<h1> to <h6> |
The heading outline of the content. | Shows whether the main content is in the HTML or added by JavaScript. |
Source, View Source, Inspect or Network?
Which view to use for which question.
| View | What it shows | Best for |
|---|---|---|
| Page source (this tool) | The HTML the server sends, before scripts run | Meta tags, canonical, structured data, what crawlers read first |
| View Source in your browser | The same, as your own browser received it | Pages that block our server, or that depend on your login or cookies |
| Inspect Element (DOM) | The live page after JavaScript has changed it | Elements added by scripts, layout and CSS problems |
| Network panel | Every file and request the page makes | Slow or failing files, API calls, response headers of each file |
How to use this tool
From a URL to a searchable copy of its HTML.
Enter the page URL
Choose who the request comes from: Chrome on Windows, Chrome on Android or Googlebot.
Follow the response
Redirects are followed one hop at a time, and every address is checked to be a public one.
Read the summary
Title, description, canonical, robots, headings, scripts and other key parts are pulled out for you.
Search and export
Find any text in the source, then copy it or download it as an .html file.
What this tool does, and what it doesn't
A plain list, so you know exactly what to expect.
This tool does
- Fetch the raw HTML from our server
- Show each redirect and the status
- Request as desktop, mobile or Googlebot
- Color, number and search the source
- Summarize head tags and scripts
- Copy or download it as .html
This tool does not
- Run the page's JavaScript
- Bypass logins, paywalls or firewalls
- Download CSS, scripts or images
- Come from Google's own IP addresses
- Reach private or local addresses
- Store URLs or page copies
Where your data goes
The URL you enter goes to our server, which fetches the page with the user agent you chose and sends the HTML back to your browser. No copy of the page and no URL history is kept. The summary is worked out in your browser. Fair-use counters use a hashed IP address, as described in our privacy policy.
Why your results might look unexpected
The six situations people run into most, and what each one means.
403, 429 or a challenge page
Bot protection refused our server. Use View Source (Ctrl+U) in your own browser.
Almost no text in the body
The page is built by JavaScript. The content appears only in the DOM, after scripts run.
Different from your browser
The site varies its HTML by device, country, cookies or consent. Try another "Request as".
Strange characters
The page declares the wrong charset. The tool converts using the declared one.
You see a login or consent page
The URL redirects there for visitors without cookies. Check the redirect chain.
The source is cut off
Pages over 5 MB are shown up to that point. Googlebot reads only the first 2 MB of HTML.
Questions about page source code
Why does the source look different from the live page?
The source is the HTML the server sends, before the browser applies CSS and runs JavaScript. The page you see is built from that HTML plus stylesheets, scripts, images and data loaded afterwards. Sites can also send different HTML depending on the device, country, cookies or a consent banner, so the source our server receives can differ from what your own browser gets.
What is the difference between page source and Inspect Element?
Page source is the original HTML from the server. Inspect Element in browser developer tools shows the DOM: the live page after JavaScript has added, removed or changed elements. On sites built with React, Vue or similar frameworks the source can be an almost empty shell, while the DOM holds the full content.
Why did I get a 403 Forbidden or a challenge page?
The site refused our server's request, usually because a firewall or bot protection such as Cloudflare or Akamai blocks automated traffic from data centers. The tool does not bypass these protections. Use View Source in your own browser instead: press Ctrl+U on Windows or Linux, or Option+Command+U in Chrome on a Mac.
What does "Request as" change?
Only the user agent our server sends: Chrome on Windows, Chrome on Android, or Googlebot smartphone. Sites that serve different HTML to phones or to crawlers will answer differently. The request still comes from our server, not from Google, so sites that verify Googlebot by its IP address may block it or treat it as a normal visitor.
Does it show the CSS and JavaScript files?
It shows the link and script elements that load them, and counts them in the report, but not the contents of those files. Inline styles and scripts written inside the HTML are shown, because they are part of the source. To see each file, open it from its URL or use the Network panel in your browser's developer tools.
Why doesn't the downloaded file look like the website?
The file holds only the HTML. Stylesheets, scripts, images and fonts stay on the original site, and relative links such as /style.css point to your computer once the file is opened locally. Tick "Add base tag" before downloading: the tool inserts a base tag with the page address, so most of those files load from the original site again.
Is the URL or the page stored?
No. Our server fetches the page, sends the HTML to your browser and keeps no copy and no list of URLs. The page summary is worked out in your browser. Fair-use counters are kept for up to a day under a hashed version of your IP address, as described in our privacy policy.