Wednesday, July 25, 2018

The Difference Between URI, URL and URN

This small post briefly explains the difference between URI, URL and URN. Sometimes the first two terms are used interchangeably, and the last one is encountered less frequently in software development. Anyway, it is a good idea to understand the difference between them.

URI (Uniform Resource Identifier)

In accordance with Wikipedia, a Uniform Resource Identifier (URI) is a string of characters designed for unambiguous identification of resources and extensibility via the URI scheme. In other words, URI is designed to uniquely identify a resource, but it may lack of information about the location or retrieval protocol of a resource. URI is defined by schemes. Schemes specify concrete syntax and associated protocols. The most known URI type is Uniform Resource Locator (URL). More information about URI can be found here.

There are a few URI examples:
  • — URI which is also a URL.
  • data:,Example%20URI — URI which is not a URL (this is a data URI).
  • view-source: — another example of URI which is not a URL (this is a URC).

URL (Uniform Resource Locator)

Wikipedia says that a Uniform Resource Locator (web address) is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. In other words, URL contains two additional pieces of information that may be missing from URI (depending on URI scheme): a location and a retrieval protocol for a resource. This is the key difference between URL and URI. Another important thing to remember: every URL is a URI, but not vice versa. More information about URL can be found here.

There are a few URL examples:
  • /other/link.html — relative URL

URN (Uniform Resource Name)

A Uniform Resource Name is yet another form of URI. It uses 'urn' scheme to identify a resource with a unique and persistent name. More information about URN can be found here.

There are a few URN examples:
  • urn:uuid:1be065ad-43e0-4d34-bd66-6ffc005f2edf — globally unique identifier (GUID).
  • urn:isbn:1231231234 — identifies a book by ISBN.

That's it.
Thanks for reading!


  1. AWS Training in Bangalore - Live Online & Classroom
    myTectra Amazon Web Services (AWS) certification training helps you to gain real time hands on experience on AWS. myTectra offers AWS training in Bangalore using classroom and AWS Online Training globally. AWS Training at myTectra delivered by the experienced professional who has atleast 4 years of relavent AWS experince and overall 8-15 years of IT experience. myTectra Offers AWS Training since 2013 and retained the positions of Top AWS Training Company in Bangalore and India.

    IOT Training in Bangalore - Live Online & Classroom
    IOT Training course observes iot as the platform for networking of different devices on the internet and their inter related communication. Reading data through the sensors and processing it with applications sitting in the cloud and thereafter passing the processed data to generate different kind of output is the motive of the complete curricula. Students are made to understand the type of input devices and communications among the devices in a wireless media.

  2. Best Dot Net Software Training institute in Hyderabad
    Peers Technologies is the Best software training
    Institute for C#.NET,ASP.NET,MVC,Angular Js,Java,Oracle,Testing Tools,
    SQL Server,Android,iPhone,Sharepoint,Oracle,Hadoop,Data Science,Python,DevOps,
    Salesforce CRM,IOT,SAP, in Hyderabad