Source code viewer
Read the HTML source of a public page with line numbers, search, copy and download.
About Source Code Viewer
Enter an address and our server fetches the page and sends back its HTML. You can scroll through it with line numbers, search for any text with next and previous buttons, copy all of it or save it as a file. The source is displayed as plain text and is never run, so nothing on the page can execute. You can fetch it as a few different user agents, which helps when a site sends different HTML to phones or bots.
- Reading the code of a page without opening developer tools.
- Searching for a tag, script or tracking code.
- Comparing what different user agents receive.
- Saving a copy of a page's HTML.
How to use Source Code Viewer
Step 1
Enter the page address and pick a user agent if you need one.
Step 2
Press View source.
Step 3
Scroll, search, copy or download the HTML.
Good to know
- This is the HTML the server sends, not the page after scripts have changed it. Developer tools in your browser show that changed version.
- We read at most 1.5 MB. A larger page shows a notice and is cut at that point.
- The address you type is sent to our server to fetch the public page and is not stored.
Common questions
Is it safe to view an unknown page this way?
Yes for viewing. The code is fetched by our server and shown as text in your browser, so it does not run. Be careful if you download and open a saved file.
Why is the source different from what my browser shows?
Browsers run scripts that add and change elements after loading. The source here is the original HTML before any of that.
Why can I not fetch some pages?
Pages behind a login, pages that block our server and addresses that are not public cannot be fetched. The message tells you which case it was.