View the Source Code of Any Website

How to View the Source Code of Any Website [ultimate guide]

Posted by

Having knowledge on how you can view the source code of any website is very crucial because you can see the actual codes that browsers interprets and displays to you when you visit any website.

Today there are so many ways that you can use to view website source codes (including using browser inbuilt functions and other online tools).

How do you ensure that you properly view and understand the source code of the website you’re viewing?

Download Now

You need to have basic knowledge of some web design languages: HTML, CSS, and JavaScript; for you to be able to understand the source code you’re viewing.

If you’re new to viewing the source codes of websites, don’t fret.

In this post I will cover the basics and essential necessity of website source codes (including its definitions) and provide you a guide to view source codes yourself (for free).

Continue reading ↓

What does website source code mean?

Source code as defined by Wikipedia is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text.

Website source code is the collection of codes written using human-readable web development languages, mainly as plain text which browsers now translate and serve as website front end to its users.

Website source codes contains both the internal codes written within the website library and some external codes that are being called using their respective codes.

Although it may seem tedious and difficult to find some codes when you view the source code of websites.


The best way to understand website source codes is to break meaning and the function of some codes that you’re likely to see in every websites source code. In that order, website source code is: ⤵

  1. The head section – There is always an intro code before the HTML head tag. This includes the code that describes that the type of document you’re viewing is an HTML. Inside the head (<head> and </head>) you’ll find the Meta tags, the title of the web page you’re viewing, the links to all the external files that helps the web page to function.
  2. The CSS and JavaScript files – Though this is also included in the HTML head section. The reason for this is to make sure that the CSS and JavaScript runs in every page of the website. Some content management system like WordPress has separate folder for CSS files and JavaScript files. So in the website source code, the CSS and JavaScript files will have links like href=’https://folder/file.css’ and scr=’https://js/folder/file.js’ respectively.
  3. The body section – This is where all the HTML codes that make up a web page can be found. The HTML source code of every single file that you find in a web page can be seen within the <body> and </body> section. If you find something within a web page and you decide to view the source code of that particular item, search carefully within the <body> and </body> and you will find its HTML code.
Also read:   Tik Tok - Read everything you need to know about Tik Tok

For visual learners, this is an example of a website source code. ⤵

website source code

Bonus guide: Top 15 Online Business Ideas

How does website source code work?

When a user views the source code of any website, the result that will be presented to him/her will be the HTML layout of that particular web page (alongside other external files that makes up that web page).

For example when you view the source code of JonakyBlog, the result will be the HTML & CSS codes that renders the layout of JonakyBlog arranged in a sequential order.

This is mainly because the World Wide Web Consortium (W3C) has set a standard on how web pages HTML codes should be rendered both in the back end and the client’s side.

That creates an index for every website you’re viewing its source code.

Now let’s dive into how you can view this source code in different devices.

Viewing website source code with desktop browsers

The main reason for checking a websites source code is to view the actual code that make up that particular web page. Every web browser allows you to view web source codes easily by pressing some commands in your keyboard.

Below I will show you the simple methods which you can use to view web source codes in different browsers.

Google Chrome Chrome source code

For you to view web page source code from your Google Chrome browser, follow the guide below;

  1. From your computer keyboard, press Ctrl + U

Alternatively, you can follow this second method

Also read:   Top 25 Best Laptops for Engineering Students [Detailed]

2. Right click on any white space in the web page, from the list of options select view page source

Firefox Firefox source code

To view web page source code in Mozilla Firefox, follow the guide below;

  1. From your computer keyboard, press Ctrl + U

Alternatively, you can follow this second method

2. Right click on any white space in the web page, from the list of options select View Page Source

Microsoft Edge Microsoft Edge source code

To view website page source code in Microsoft Edge, follow the guide below;

  1. From your computer keyboard, press Ctrl + U

Alternatively, you can follow this second method

2. Right click on any white space in the web page, from the list of options select View page source

Opera Browser Opera source code

Viewing web page source code in Opera browser is similar to other web browsers. Follow below guide to achieve this.

  1.  From your computer keyboard, press Ctrl + U

Alternatively, you can follow this second method

2. Right click on any white space in the web page, from the list of options select Page source

More browsers

Apple Safari Safari

To view website page source code in Apple Safari, follow the guide below;

  1. From your computer keyboard, press Ctrl + U

Alternatively, you can follow this second method

2. Right click on any white space in the web page, from the list of options select View source

For you to view website page source codes on other desktop browsers like: UC Browser, Maxthon etc. follow the same similar methods as illustrated above.

NOTE: If you’d used the Ctrl + U to view the web source code, it will automatically open a new tab for the source code of the current page. For you to get back to your current web page, you should either close the source code tab or you switch to the previous tab.

Mobile devices

Unfortunately most mobile browsers don’t provide an inbuilt option to allow its users view web page source code directly from the browser. From research, we found a method whereby mobile users who have Google Chrome browser installed in their device can view a web page source code.

Also read:   Samsung TV - Read all you need to know before buying Samsung TV ?

[Android] Google Chrome Chrome

If you want to view web page source code with your Google Chrome browser in your mobile device, follow the guide below.

  1. Launch the Google Chrome browser from your android device
  2. Go to the website that you want to view its source code
  3. With your finger touch the address bar, edit it and move your keyboard cursor to the first letter of the URL
  4. Now type view-source: just in front of the URL and hit Enter or Go


For instance, if you wish to view the source code of jonakyblog in your Google Chrome mobile browser. Go to, edit the link and type in view-source: just before the URL.

This is how it’s going to look like – view-source:

Other methods of viewing web page source in mobile devices

There are so many online tools that one can use to view any web page source code. These online tools has so many pros compared to default web browser page source viewer in the sense that some of the online tools has the ability to stylize the source code of a website.

This helps source coders to easily trace and locate the particular code that they are looking for in the web page.

Some of the recommended online tools for viewing website source code in desktop as well as mobile devices are listed below: ⤵

  1. Submitexpress
  2. Htmlstrip
  3. visiospark
  4. view-page-source
  5. internetmarketingninjas
  6. webtoolhub
  7. searchenginegenie
  8. coolseotools
  9. codebeautify (superb)
  10. generateit


Getting to know how you can view a website source code is a plus especially for web developers who may like to have an insight on the HTML code of some websites.

You should know that if you were unable to view any web page source directly from your browser, there is an alternative where you can use the above listed online tools to view it.

Don’t forget to share your ideas and experiences with viewing website page source with us, use the comment section below.

Here are other posts you should read: ⤵

  1. Complete Guide on How to Be a Successful Freelancer
  2. Inspirational Mathematical Differences
  3. 12 Effective Graphics Design Steps


  1. Thank you. Am glad that you find my articles helpful.
    Considering the Whatsapp training as you mentioned! I will look to that.
    Although my website is an open source platform. So I think that we can discuss anything here in my website.

    Any topic that you want us to cover, all you have to do is to contact us using the contact form or you can drop it here in the comment box.


  2. Yes you can copy someones source code and use the code in designing your own website.
    I can teach you source code for free.

    The codes that you can copy are HTML, CSS & JavaScript. PHP source codes can't be seen directly from your browsers.
    If you’re good in source code, you can design any website to your maximum satisfaction.

  3. Woah! I’m really enjoying the template/theme of this website.

    It’s simple, yet effective. A lot of times it’s difficult to get that “perfect balance” between user friendliness
    and appearance. I must say that you’ve done
    a fantastic job with this. Additionally, the blog loads extremely quick for me on Chrome.
    Outstanding Blog!

  4. Now I am going to do my breakfast, when having my breakfast coming again to read more news.

  5. If some one needs expert view about blogging and site-building afterward i advise him/her to visit this webpage, Keep
    up the fastidious work.

  6. Wow, this paragraph is fastidious, my younger sister is analyzing
    these kinds of things, thus I am going to convey her.

  7. Howdy! This is my 1st comment here so I just wanted to give a quick
    shout out and say I really enjoy reading through your articles.
    Can you suggest any other blogs/websites/forums that deal with the same topics?
    Thank you so much!

  8. I have been browsing online greater than three hours as of late, but I never found any
    interesting article like yours. It is lovely value enough for me.
    In my view, if all site owners and bloggers made just right content material as you did, the net will probably be much more useful than ever before.

  9. If you are going for best contents like myself, simply visit this site all
    the time as it provides feature contents, thanks

  10. Do you mind if I quote a few of your posts as long as I
    provide credit and sources back to your website?
    My website is in the exact same area of interest as yours and
    my users would definitely benefit from some of the information you provide here.
    Please let me know if this alright with you. Many thanks!

    1. Hi!
      You can go ahead to quote some of my contents. But make sure you make sure to put my article URL so that your users can view the original source of the content.