Website Source Code Viewer
Read the HTML behind any public page, on any device. Enter an address to see the source exactly as the server delivers it, with line numbers, an optional tidy formatting, and lists of the scripts, style sheets, images, links and response headers.
- Encrypted connection
- No sign-up
- Free to use
How to use Website Source Code Viewer
- Enter the address of the page.
- Select View source.
- Read the code in the Source tab; tick Format to indent it for easier reading.
- Open Resources for the files and meta tags the page uses, or Headers for the server response; copy or download the source if you need it.
Website Source Code Viewer features
Works on phones and tablets
Mobile browsers have no “view source” command; this tool gives you the same view anywhere.
Line numbers and formatting
Shows the raw source, or a re-indented version when a page is minified.
Resource lists
Every script, style sheet, image, frame and link referenced in the HTML, as absolute addresses.
Meta tags at a glance
Title, description, Open Graph and other meta tags in a table.
Response headers
Status code and all headers that came with the page.
Safe viewing
The code is shown as text and never run, so a page cannot do anything in your browser.
When to use Website Source Code Viewer
- Inspecting how a page is built when you only have a phone at hand.
- Checking what meta tags, structured data or tracking scripts a page contains.
- Verifying what the server really sends, without your browser's extensions or cache in the way.
- Saving a copy of a page's HTML for comparison or study.
Website Source Code Viewer FAQ
How is this different from “View page source” in my browser?
It shows the same thing, the HTML sent by the server, but it works on devices whose browsers lack that command, and the request is made from our server without your cookies, login or extensions. You see the page as a first-time visitor or a search engine crawler would receive it.
Why does the source not contain the content I see on the page?
Many modern sites deliver an almost empty HTML document and build the visible content with JavaScript in the browser. The source then contains scripts and placeholders. What you see in the browser's element inspector is the result after those scripts have run, which this viewer does not reproduce.
Is it legal to view a website's source code?
Yes. The HTML, CSS and JavaScript of a page are sent to every visitor's browser, and reading them is how the web has always been learned. Copying substantial parts of someone's code or design into your own project is a different matter and may infringe their rights.
Can I see PHP or other server-side code?
No. Server-side code runs on the server and only its output, the HTML, is sent out. No tool can retrieve it from outside.
What does the Format option do?
It re-indents the HTML so that nested elements are easy to follow. This helps with pages whose source is on one long line. The formatted view is for reading; the original is what the server sent.
Is there a size limit?
Pages up to 2 MB of HTML are shown in full. Larger documents are cut off at that point, with a note.
What the source of a page tells you
Every web page begins as a text document. Its head section declares the title, the description shown in search results, the preview image used when the page is shared, the language, and the style sheets and scripts to load. Its body holds the content and structure. Reading that document is the most direct way to answer questions about a page: which analytics does it use, does it have a canonical address, is the heading really a heading or just large text, where does that embedded widget come from.
For people learning web development, source code is the original textbook. Seeing how an experienced team structures a navigation bar, marks up an article or declares responsive images teaches more than many tutorials. Minified production code is hard to read, which is why the viewer can re-indent it, and why the resource list pulls out the addresses of the separate CSS and JavaScript files so that you can open them individually.
The view from a neutral server has a specific diagnostic value. Your own browser shows a page after extensions have modified it, with your cookies and your cached files. When a change you deployed does not seem to appear, or a visitor reports something you cannot reproduce, comparing with what the server sends to an anonymous request quickly shows whether the problem is on the server or on your machine.
A note on safety: viewing source here cannot harm your device. The page's code is treated purely as text. It is placed in a text field and parsed only to list its references, without running scripts or loading the files it mentions.