How to View Page Source in Any Browser

Shortcut keys and step-by-step methods to view HTML source in Chrome, Safari, Firefox, Edge and more - on desktop and on mobile.

Binary code

Shortcuts to view page source in each web browser

Here are shortcut keys and other ways to view the source code of any website on the most common browsers

On a phone? Mobile browsers make this harder - jump to our dedicated guide on how to view page source on iPhone & Android, or use the free tool to view any page's source right on your device.

Apple iPhone

How to view source on Apple iPhone

Apple's iPhone and other iOS devices do not provide a simple way to view the source code - there is no built-in "view source" and view-source: URLs are blocked. On these devices, the source can be viewed through third-party apps, a bookmarklet, or a service such as View Page Source. See our step-by-step guide to viewing page source on iPhone for the easiest method.

Google Chrome

How to view source on Google Chrome

Open the desired website and right click anywhere on the page. Then select View Page Source. Or go to the top menu of your browser and view the source from there. You can also choose "Inspect" from the right click menu to see more details.

Shortcut Keys

  • Ctrl + U
  • Option + Cmd + U

Safari

How to view source on Safari

Under Preferences, go to Advanced, and check the Show Develop menu in menu bar box. Now use the keyboard combo Command + Option + u to show the source code panel. Or right click on the web page and click Show Page Source.

Shortcut Keys

  • Option + Cmd + U

Microsoft Edge

How to view source on Microsoft Edge browser

In the address bar, type about:flags and open the options page. Enable the Show "View source" and "Inspect element" in the context menu checkbox. Now you should be able to right click on any page and click View source.

Shortcut Keys

  • Ctrl + U

Mozilla Firefox

How to view source on Mozilla Firefox

In Mozilla Firefox, viewing the source code of the current website is quite simple. Open the web page, and use the keyboard shortcut combo Control + u, or go to the menu, and under Tools, go to Web Developer and click Page Source.

Shortcut Keys

  • Ctrl + U
  • Option + Cmd + U

Opera

How to view source on Opera

In Opera, simply open the desired website, and press Control + U to view its source code. Or right click somewhere on the page and select Page source from the dropdown menu. You can also go to developer tools by pressing Control + Shift + I.

Shortcut Keys

  • Ctrl + U
  • Option + Cmd + U

Samsung Internet

How to view source on Samsung Internet

Samsung Internet is the default web browser on many phones. To view the source, open any site, and go to the location bar. Add view-source: before the URI (e.g. view-source:https://www.view-page-source.com/) and click go.

UC Browser

How to view source on UC Browser

Developed by a subsidiary of the Ali Baba group, UC Browser's growth is stunning. To view a page's source, in the location bar add view-source: before the URI (e.g. view-source:https://www.view-page-source.com/) and click go.

Android devices

How to view source on Android devices

On an Android device, open the website in the Chrome browser, go to the location bar, and before the URI, add view-source: (e.g. view-source:https://www.view-page-source.com/). Then touch the right arrow (→) on the keyboard. For formatted, syntax-highlighted output, see how to view page source on Android.

Yandex browser

How to view source on Yandex browser

Simplest way is to right click on the page, and select View page source. You can also use the menu. Just click the three dots on the top right, go to More tools, and click View source.

Shortcut Keys

  • Ctrl + U
  • Option + Cmd + U

Brave browser

How to view source on Brave browser

Since Brave is based off of Google Chrome, you can use the same procedure to look at the source. Right click on the page, and select View Page Source. You can also use the top menu, or the right click + "Inspect" way to get the same results.

Shortcut Keys

  • Ctrl + U
  • Option + Cmd + U

Internet Explorer

How to view source on Internet Explorer

In Microsoft Internet Explorer, open the web site, and use the keyboard shortcut combination Control + u. Alternatively, go to the menu, and under View, click Source. It really is as simple as that in most versions of Internet Explorer.

Shortcut Keys

  • Ctrl + U

Chromium

How to view source in Chromium

Open the desired website and right click anywhere on the page. Then select View Page Source. You can also click the wrench icon on the top right, go to Tools, and click View Source. You can also use the keyboard shortcut Control + U.

Shortcut Keys

  • Ctrl + U
  • Option + Cmd + U

Lynx/Links

How to view source on Lynx/Links

Links, and its older cousin Lynx, are text-based browsers that are used from the command line. They may seem like remnants of the past, but are handy tools. To view the source of any website that you have opened, press the backslash "\" key.

Shortcut Keys

  • \