Difference Between URI, URN and URL

The URI (Uniform Resource Identifier), URN (Uniform Resource Name) and URL (Uniform Resource Locator) are closely related concepts, but they are not exactly the same, even though the terms are sometimes used interchangeably. Let me break down the differences today.
Uniform Resource Identifier
A URI is a more general term that refers to any string that uniquely identifies a resource on the internet or a network.
It allows uniform identification of the resources.
URI is used to distinguish one resource from other regardless of the method used.
A URI can be further classified into URL (Uniform Resource Locator) or URN (Uniform Resource Name).
A URI does not necessarily need to provide the location of the resource. It can simply identify the resource without indicating where to find it.
For example:
azure://myaccount/mycontainer/myblob
(a URI that identifies a resource but doesn’t specify how to access it over the network). Here it refers to any identifier of a storage resource. It may include a path to a blob, table, queue, or file in your Azure Storage account, but it might not always include the protocol or detailed access information.
Uniform Resource Locator
As the name says it uniquely locates the resource. So, A URL is a specific type of URI that not only identifies a resource but also provides the means to locate it (i.e., it tells you how to access the resource, typically via HTTP/HTTPS).
A URL always includes information about the protocol or method used to access the resource (e.g.,
https://
,ftp://
), and it generally provides a direct way to reach the resource over the internet or a network.In simple terms, URL is a type of URI that specifies both how and where to access the resource.
For example:
https://mystorageaccount.blob.core.windows.net/images/myimage.jpg
(a URL specifies the location of the resource, using the HTTP protocol).https://example.com/resource
(indicates a protocol and location)
Uniform Resource Name
A URN (Uniform Resource Name) is a type of URI that uniquely identifies a resource without providing a means of locating it.
Unlike a URL (which provides a way to find or access the resource, often over the internet), a URN simply serves as a unique name for the resource. It doesn’t tell you where or how to access the resource, just what the resource is.
In simple terms, URN is a type of URI that provides a unique identifier but does not tell you how to locate or access the resource.
For example:
One of the common examples of a URN is an ISBN for books:
urn:isbn:0451450523
UUID (Universally Unique Identifier):
urn:uuid:550e8400-e29b-41d4-a716-446655440000
Some Characteristics of a URN:
Permanent: A URN is intended to be persistent and unique, meaning it will continue to refer to the resource regardless of changes in its location or how you access it.
Namespace-based: URNs are usually divided into namespaces, like
urn:isbn
for books orurn:uuid
for unique identifiers.
Note : URL AND URN is always a URI but not all URI's are URN or URL
Subscribe to my newsletter
Read articles from Sakshi Nasha directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Sakshi Nasha
Sakshi Nasha
I am Sakshi Nasha, a full-time Software Engineer. I am an enthusiastic learner who believes that technology can create extraordinary impacts on the world. Beyond coding, I’m an athlete at heart and find joy in expressing myself through blogs and poetry, reading a great book, or strategizing for my next marathon. When away from the keyboard, you can find me trekking or cycling around the city!