Difference Between URL and URI


Main Difference

URI and URL are used to find the resources or name in the internet. URL is the subset of URI. URI and URL are differ by the protocol to retrieve the resource. URL uses a network protocol e.g. http, https etc to retrieve resource from its location. URI with its subset URN uniquely identifies the resources e.g. ISBN. Every URL is URI but not vice versa. We can take an example. If the name of person is identified, it is URN. If his address is identified, it is URL. If both name and address are identified, it is URI.

What is URI?

URI stands for Uniform Resource Identifier. It is used to find name or source on internet. It is a compact sequence of characters to identify a physical source. It identifies resource by either name or a location or maybe both. It includes authority, scheme fragment and query. It has subsets URL (Uniform Resource Locator) and URN (Uniform Resource Name). In library tag the URI is used to locate binary corresponding.


What is URL?

URL stands for Uniform Resource Locator. It is the subset of URI. It is used to find the location along with retrieve the source. e.g. http://www.differencebtw.com/. It is used to find the location of a resource.

Key Differences

  1. URI is an identifier for some resource while URL provides specific information to get the source.
  2. URL is the subset of URI.
  3. URI is the superset of URL and URN.
  4. If both location and name of a resource are described then it is URI but not only URL.
  5. If only location of a source is described then it is URL but also URI.
  6. Every URL is URI but not vice versa.
  7. Every URN is URI but vice versa is not compulsory.
  8. Every URI may be URL or URN but not compulsory.
Harlon Moss

Harlon currently works as a quality moderator and content writer for Difference Wiki. He graduated from the University of California in 2010 with a degree in Computer Science. Follow him on Twitter @HarlonMoss