What is the difference between an URL and URI?

Hello guys, I am back with another coding related article. Today, I am going to explain the difference between an URL and URI. Let’s get into it.

URI (Uniform Resource Identifier)

This might or might not be a new term for you. URI is used to identify a resource. For example, my name can be taken as a URI, since it identifies me.

URL (Uniform Resource Locator)

We all know and use URLs every day. In fact, if you look at your browser’s address bar, you will be able to see the URL for this specific article.

So, URL is used to access a resource’s location. Here are some examples of URLs.



/mine/dream.html (Only useful along with another URL)


The difference between these two terms is simple. But lot of people get confused with the two terms and use them incorrectly.

As I said, I can take my Name, Thisura, as a URI. But it does not reveal anything about where I live. If we take my address, that is an example for an URL. If you go to my address, you are going to find me.

URL is a subset of URI. A URL can be taken as a URI. But a URI can not be taken as a URL.


Image Source – seleniumwithjavapython

Read and learn more about this matter by referring to the articles down below.

Stack Overflow Answers with more detailed explanations (Highly Recommended)

GeeksforGeeks Explanation

That is it, guys. This was more of a short and simple article. If you want more articles like this, please subscribe to my blog so you will receive notifications when I publish a new post. Thank you for reading the article. Stay safe ✌

Published by Thisura Thenuka

I am a passionate software engineering student. But cricket is my first love ❤

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: