View Page Source
View page source shows the HTML a server sent, before any JavaScript changed it. Paste an address here and press the button: the page is fetched server-side and returned with syntax highlighting, a line count and a character count. Fetching https://example.com returns 559 characters over 2 lines, which you can copy or download as example_com_source.html.
Popular Tools
About View Page Source
This tool does what a browser's View page source does, but from a server instead of your device. Type or paste an address — https:// is added if you leave it off — press the button, and the raw response comes back highlighted: tags in one colour, attribute names in another, quoted values in a third and comments in grey. Above the code you get the number of lines and characters, and two buttons: Copy puts the whole document on your clipboard, and Download saves it as the hostname with dots replaced by underscores, plus _source.html.
Because the fetch happens on the server, it works on a phone, where no mobile browser offers a view-source menu, and it works when a site has disabled the right-click menu, since none of that affects what the server sends. It also means you see the document exactly as a crawler would, before any script has run.
That is the important distinction. View source is the HTML that arrived; Inspect Element in developer tools is the live DOM after JavaScript has added, moved and removed elements. On a single-page app the two look nothing alike — the source may be almost empty while the inspector is full — and it is the source that a search engine reads first.
The limits are deliberate. Requests are capped at 20 a minute, a fetch times out after 5 seconds, at most 5 redirects are followed and every hop is re-checked, and a response over 1 MB is truncated with a comment saying so. Only http and https addresses are accepted; private and reserved IP ranges, localhost, internal domain suffixes such as .local and .internal, cloud metadata endpoints and a list of internal ports are refused. Pages behind a login cannot be read, because the request carries no cookies of yours.
Use Cases
How to use
Paste the address of the page you want into the URL box. Leaving out https:// is fine; it is added automatically.
Press the view source button. It shows a loading state while the server fetches the page, following up to five redirects.
Read the highlighted HTML, with tags, attribute names, quoted values and comments in different colours.
Check the line and character counts above the code to judge how much markup the server actually sent.
Press Copy to put the raw source on your clipboard, or Download to save it as the hostname followed by _source.html.
Compare what you see with your browser's Inspect Element if a page looks emptier than expected: the difference is everything JavaScript adds.
Pro Tips
- The protocol is optional. Type example.com and https:// is added for you; if a site only answers on http, type the http:// prefix explicitly.
- The address box updates to the final URL after redirects, so if you asked for a bare domain and got the www version, the field tells you where the source actually came from.
- Use the line and character counts as a first signal. A page that returns only a few hundred characters is almost certainly a JavaScript-rendered app whose real content is not in the HTML.
- Copy sends the raw source to your clipboard, not the coloured version, so pasting into an editor gives you valid HTML rather than markup full of highlight spans.
- If a document is bigger than 1 MB it is cut off and a truncation comment is appended at the end. Check the last line before assuming a page simply has no closing tags.
Troubleshooting
The source is nearly empty although the page is full of content.
The site renders in JavaScript. View source shows the HTML the server sent, and on a single-page app that can be a shell of a few hundred characters. Everything else is built in the browser, which is why the inspector looks different — and why crawlers may not see that content either.
An error says private or internal addresses are not allowed.
The fetch runs on a server, so it refuses anything that could reach an internal network: localhost, private and reserved IP ranges, hostnames ending in .local, .internal, .lan or .intranet, cloud metadata endpoints and a list of internal ports. Use a publicly reachable address instead.
It says the page could not be fetched, or the site is blocking requests.
The request identifies itself as FreeWebTools View Source Bot and gives up after five seconds, so a slow page or a site that blocks unknown user agents will fail. Pages behind a login cannot be read either, because your cookies are not sent. Try again, or use the browser's own view-source for a page you are signed in to.
Frequently Asked Questions
It shows the HTML document a web server sent for a page, before any JavaScript ran. That is what a crawler reads first, so it is where titles, meta tags, canonical links and server-rendered content live. Paste an address here and the source comes back highlighted, with the line and character counts above it.
View source is the HTML that arrived from the server; Inspect Element shows the live DOM after scripts have modified it. On a JavaScript-heavy site the source can be a near-empty shell while the inspector is full of elements. Use view source to see what a crawler gets, and the inspector to debug what a visitor sees.
Mobile browsers have no view-source menu, which is exactly why this page exists: paste the address, press the button and read the HTML on your phone. It also avoids the view-source: prefix trick, which most mobile browsers refuse to open.
Press Control-U on Windows and Linux or Command-Option-U on a Mac, or right-click the page and choose View page source. Both open a view-source: tab. If the shortcut is unavailable, or the page has disabled the context menu, fetch the address here instead.
Control-U in Chrome, Firefox and Edge on Windows and Linux; Command-Option-U in Chrome on a Mac; Command-Option-U in Safari once Show features for web developers is enabled in Settings. On a phone there is no shortcut at all, so a server-side tool is the practical answer.
Yes. Blocking the context menu is a page script and it changes nothing about the HTML the server sends. The keyboard shortcut usually still works, and fetching the address here bypasses the question entirely, because the request never involves your browser's menus.
Reading the HTML a public server voluntarily sends to every visitor is ordinary use of the web, and every browser ships the feature. What you then do with what you find is a separate question governed by copyright and each site's terms. This tool only retrieves publicly reachable pages.
The request is made by a server with no session of yours: it carries none of your cookies, so a protected page returns the login screen or an error rather than your content. For anything behind a sign-in, use your browser's own view source while you are logged in.
Yes, one megabyte. Anything longer is cut at that point and a comment noting the truncation is appended, so check the last line before concluding that a document is malformed. Requests are also limited to 20 a minute and each fetch gives up after five seconds.
Two ways. Copy puts the raw source, not the coloured markup, on your clipboard. Download saves it as a file named after the host with dots replaced by underscores — example.com becomes example_com_source.html — which you can then open in an editor.