URL Parser

Break down any URL into its individual components.

What Is a URL?

A URL (Uniform Resource Locator) is the address used to access resources on the internet. Every web page, image, API endpoint, and file has a unique URL. Understanding URL structure is essential for web developers, SEO specialists, and system administrators.

A URL consists of several components, each serving a specific purpose in identifying and locating the resource.

URL Components Explained

  • Scheme — The protocol used to access the resource (e.g., https, http, ftp). HTTPS indicates a secure, encrypted connection.
  • Host — The domain name or IP address of the server (e.g., example.com, 192.168.1.1).
  • Port — The network port on the server. Defaults to 80 for HTTP and 443 for HTTPS. Custom ports are specified after a colon (e.g., :8080).
  • Path — The specific resource location on the server (e.g., /api/users/123). Similar to a file path in a directory structure.
  • Query — Key-value parameters passed to the server, starting with ? and separated by & (e.g., ?page=2&sort=name).
  • Fragment — A reference to a specific section within the page, starting with # (e.g., #section-2). Fragments are not sent to the server.
  • UserInfo — Optional authentication credentials in the format user:password@ before the host. Rarely used and considered insecure.

Example: https://user:pass@example.com:8080/path/page?key=value&lang=en#top breaks down into: scheme=https, userinfo=user:pass, host=example.com, port=8080, path=/path/page, query=?key=value&lang=en, fragment=#top.

URL Encoding

URLs can only contain a limited set of characters from the ASCII character set. Special characters (spaces, Unicode, reserved symbols) must be percent-encoded. For example, a space becomes %20 and an ampersand becomes %26.

Use our URL Encoder and URL Decoder tools to handle percent-encoding.

Frequently Asked Questions

What is the difference between a URL and a URI?

A URI (Uniform Resource Identifier) is a broader concept that includes both URLs and URNs. A URL specifies the location of a resource (how to access it), while a URN specifies the name of a resource (what it is). In practice, most people use URL and URI interchangeably.

What is the maximum URL length?

There is no official limit in the HTTP specification. However, most browsers support URLs up to 2,048 characters (Internet Explorer) to 64,000+ characters (modern browsers). Web servers like Apache and Nginx typically limit URLs to 8,192 characters by default.