How to view the source code of any website
Try it now: Get Page Source Code, free and private in your browser.
Open Get Page Source CodeEvery web page is built from HTML that your browser downloads. Viewing that source shows you how the page is made: its title, meta tags, links, scripts and more. It is useful for learning, debugging and SEO checks.
View source in a desktop browser
- Press
Ctrl+U(Windows and Linux) orCmd+Option+U(Mac). - Or right-click the page and choose View page source.
- Or type
view-source:before a web address.
View source on a phone
Mobile browsers hide this feature. In Chrome on Android you can type view-source: and then the address. On iPhone, the options are limited. A web tool that fetches the source for you works on any device.
Source vs rendered page
View Source shows the HTML the server sent. DevTools (the Elements panel) shows the page after JavaScript has changed it. On sites built with frameworks such as React, the source may be nearly empty while the rendered page is full. Check both when you debug.
What to look for
- Title and meta description: what search results may show.
- Canonical link: the preferred address for the page.
- Robots meta tag: whether the page may be indexed.
- Open Graph tags: the preview shown when the page is shared.
- Headings: one clear H1 is a good sign.
- Scripts and stylesheets: what the page loads, which affects speed.
- Structured data: JSON-LD blocks that describe the page to search engines.
See a page the way a phone does
Some sites send different HTML to mobile browsers. Our tool lets you fetch the source as a desktop or mobile browser, so you can compare.
Limits and good manners
- You can only see public pages. Pages behind a login are not reachable.
- Some sites block automated requests.
- Viewing source is fine for learning, but copying someone's design or text without permission may break copyright.
FAQ
- Is viewing source legal?
- Yes. Your browser already downloads this code. Reusing someone else's work without permission is a separate matter.
- Why is the source different from what I see?
- JavaScript changes the page after it loads. The source is the original HTML.
- Can I see the server code, like PHP?
- No. Servers run that code and send only the HTML result.
- Can I view the source of a mobile page?
- Yes. Choose Mobile browser in the tool.