View Page Source Online
See the source code of any page
Paste a web address to read the HTML the server sent, with line numbers, search, response headers and a Beautify button that indents minified code for reading.
We fetch the page for you. Our server fetches the public address you enter and reads the response. Nothing you enter is stored. Free, no account.
How it works
Paste a web address and this tool shows the HTML source the server sent for it. Search the code, copy it, download it, read the response headers or press Beautify to indent minified HTML. No browser shortcut needed, and no sign-up.
- 1
The tool fetches the address and shows the HTML source with line numbers, a find-in-source box and a wrap toggle. Copy all and Download give you the code as text or a file.
- 2
Fetch as lets you pick a desktop browser or a phone browser, so you can compare the HTML each one receives from the server for the same address.
- 3
A response headers table lists the status, the size and any redirects the request followed, so you can check headers such as X-Robots-Tag without opening a developer tool.
- 4
Beautify indents the HTML so minified code is easier to read. It changes the display only, and Copy all and Download keep the original source.
What it does not do
It shows the HTML the server sent before scripts run. Content that a page builds with JavaScript after loading appears in Inspect Element in a browser but is missing here.
The tool has no login or cookie option, so a page behind a login shows what a signed-out visitor receives.
The tool fetches the address without cookies, session tokens or geographic signals. A page that delivers different HTML depending on those factors shows the version a fresh, logged-out request from a neutral location returns.
When a source is busy or a site does not answer, this tool says so. It never fills the gap with a guess.
How do you view the source of a page?
The quickest way is to paste the address into the box above. The tool fetches the page, shows the HTML with line numbers and lets you search it, copy it or download it. The response headers sit alongside, and Fetch as lets you choose a desktop or a phone browser.
In a browser, press Ctrl+U on Windows and Linux in Chrome, Edge and Firefox, with the Mac shortcuts in the table below. You can also type view-source: in front of an address in Chrome, Edge or Firefox and press Enter, for example view-source:https://example.com. Both routes show the same thing: the HTML the server sent before any script ran. If the page builds its content in the browser, that content is absent here, which is exactly what you need to know when checking what a crawler receives.
How do you view source on a phone?
Chrome on Android accepts view-source: in front of an address typed in the address bar. Type view-source:https://example.com with your own address and the source opens.
iPhone and iPad have no built-in way to view source. Paste the address into this tool instead and pick Phone browser in Fetch as, so the server sees a phone user-agent and you read the HTML it returns to one.
The Phone browser option in Fetch as changes the user-agent string the tool sends to the server. Some servers deliver different HTML to a phone user-agent than to a desktop one, so choosing Phone browser here shows you what that version contains. This matters when you want to check what a mobile crawler receives, since the HTML can differ from the desktop response.
Search the source with the find box, or press Beautify if the code is packed onto a few long lines. Copy all keeps the code for sending to a developer, and Download saves it as a file.
View source or Inspect Element: which one?
They show different things. View source shows the HTML the server sent before JavaScript runs. Inspect Element shows the live page after scripts have changed it.
A client-rendered page can look nearly empty in source while the live page is full, because the content is built in the browser. Crawlers that skip scripts see the same as view source, so an empty source is worth noticing when you want a page found.
A useful diagnostic is to compare the two: if a heading or keyword appears in view source, a crawler can read it. If it shows up only in Inspect Element, it depends on JavaScript, and a crawler that skips scripts will not see it. That gap is worth closing if the page should rank for the missing term.
Use view source to check what a crawler or a script-free reader receives: the title, the meta tags, the headings and the text. Use Inspect Element to check what a visitor sees after everything has loaded. For how the two rendering approaches change what a crawler receives, see server-side vs client-side rendering.
What to look for in the source
Search the code with the find box and check these items.
- The title and the meta description in the head.
- The canonical link and the robots meta tag.
- The headings, from the H1 down, to see the outline of the page.
- Structured data in a script tag with type application/ld+json.
- The response headers panel, for the status and for X-Robots-Tag.
The title and meta description in source should match what search results show. If they differ, something may be overwriting them after the page loads. The canonical points search engines to the preferred URL; a wrong canonical directs them elsewhere. A robots meta tag set to noindex blocks indexing entirely, so check it on any page that has disappeared from search.
If the HTML is minified and sits on a few long lines, press Beautify to indent it. Beautify changes the display only, and Copy all keeps the original. Browse the other [free tools](/tools) for more checks on a page.
To see what a crawler saved from a URL, view a cached version of a website.
Questions
How do I view the source of a website online?
Paste the address into the box above and run it. The tool fetches the page and shows its HTML with line numbers. Use the find box to search the code, then Copy all or Download to keep it. In a browser, Ctrl+U opens the source on Windows and Linux.
What do the response headers tell me?
The headers table shows the status code, the size and any redirects the request followed, plus headers such as X-Robots-Tag. Check it when a page seems to be missing from search or sends visitors to a different address.
Why is the source nearly empty for my site?
The source is the HTML the server sent before JavaScript ran. A page that builds its content in the browser can look nearly empty here while the live page is full. Crawlers that skip scripts see the same thin source, so it is worth checking.
Can I view a page behind a login?
The tool has no login or cookie option, so it fetches the address the way a signed-out visitor would. A page behind a login shows whatever that visitor receives. For a signed-in view, type view-source: in front of the address in your own browser.
What does Beautify do?
Beautify indents the HTML so minified code is easier to read. It changes the display only. Copy all and Download keep the original source exactly as the server sent it.
Is view source the same as Inspect Element?
They give you two different views of a page. View source is the raw HTML as the server delivered it, before any script touched it. Inspect Element shows the page after scripts have run and the browser has built the display. A page can look empty in source and full in Inspect Element when its content depends on JavaScript.
Guides
Tools that answer the next question
- How does my page look in search?Meta Tag AnalyzerShows the title, description and other meta tags of a page, and how the page will appear in a search result.
- See what my HTML looks likeHTML ViewerWrite or paste HTML and see it rendered next to the code, as you type.
- Is my website online?HTTP Status Code CheckerChecks up to 25 addresses at once and reports the status code, final address and response time of each.