Skip to main content

Difference between URI, URL and URN

Well, if you want to know if that ‘something’ is URI or URL or URN, you should always mark it as a URI because all URLs and URNs are URIs. Below are the differences:

Point of Distinction URI URL URN
Stands For Uniform Resource Identifier Uniform Resource Locator Uniform Resource Name
Subset / Superset All URLs are not URI. Subset of URI. All URLs are URI. URN is also the subset of URI
Real World Example Your name could be a URI because it identifies you, but it couldn't be a URL because it doesn't help anyone find your location. On the other hand, your address is both a URI and a URL because it both identifies you and it provides a location for you. One of the best examples of URN is ISBN number which is used to uniquely identify a book. URN is completely different than URL as it doesn't include any protocol.
Resource  The URI is the identifier of the specific resource. Like a page, or book, or a document. URL is the locator of a resource. Name of the resource


where authority = [userinfo@]host[:port]

[protocol]://www.[domain_name]:[port 80]/[path or exaction resource location]?[query]#[fragment]

<URN> ::= "urn:" <NID> ":" <NSS>

 where <NID> is the Namespace Identifier, and <NSS> is the Namespace
   Specific String.

Schema The scheme can be anything – protocol, name or specification, etc... The scheme is always a protocol like HTTP, https, ftp, LDAP etc... Namespace identifier or namespace specific String.
Purpose The main purpose of URI is to identify a resource and distinguish it from other resources using either location or name The main purpose is to get the address or location of a resource Uniquely identify Books and Journals
Example contact: +91 9999075499,



Use Used in HTML, XML and tag library files like XSLT and jstl to identify resources and binaries. URL is used to find only web pages Find Books and Journals or any other resource with name

Submitted by tgoswami on September 1, 2020

Tarun has 11+ years of experience in Quality Assurance in different domains like Banking, E-commerce, Health and Education.


At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.