Skip to content

URL Parser & Decoder Online

Paste any URL to break it down into protocol, host, path, query parameters, and fragment — free and browser-based.

Last updated:

Anatomy of a URL

Every URL follows a structured format defined by RFC 3986. Understanding each component helps you debug routing issues, construct API calls, and write correct redirect rules. A full URL can contain up to five major parts:

scheme://[userinfo@]host[:port]/path[?query][#fragment]

  • Scheme (also called protocol) indicates how the resource should be accessed. Common schemes include https, http, ftp, and mailto.
  • Authority combines optional user information (user:pass@), the hostname or IP address, and an optional port number. When no port is specified, the browser uses the scheme default (443 for HTTPS, 80 for HTTP).
  • Path identifies the specific resource on the server. Paths are hierarchical, separated by forward slashes, and are case-sensitive on most servers.
  • Query string begins with ? and contains key-value pairs separated by &. It passes parameters to the server or client-side scripts, such as search terms, pagination offsets, or tracking codes.
  • Fragment (or hash) starts with # and points to a specific section within the page. Fragments are never sent to the server — they are handled entirely by the browser.

This parser breaks any URL you provide into each of these components so you can inspect them individually, making it straightforward to verify that every part is correctly formed before using the URL in your code.

URL Encoding and Special Characters

URLs can only contain a limited set of ASCII characters. When a URL needs to include characters outside this set — spaces, Unicode letters, or reserved delimiters used as literal data — they must be percent-encoded. Percent-encoding replaces each unsafe byte with a % sign followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26.

The reserved characters: / ? # [ ] @ ! $ & ' ( ) * + , ; = — have special syntactic meaning in URLs. If you need to include one of these characters as part of a value (for instance, an = sign inside a query parameter value), it must be encoded so the parser does not misinterpret it as a delimiter.

Modern browsers display decoded Unicode in the address bar for readability, but the underlying HTTP request always uses the encoded form. When you copy a URL from a browser and paste it into code, watch out for this difference — the visible URL may look clean, but the actual request may require encoding. Use our URL Encode/Decode tool to convert between the two forms.

Common URL Debugging Scenarios

Many web development bugs trace back to malformed or misunderstood URLs. Here are the issues developers encounter most often:

  • Trailing slash inconsistency. /about and /about/ are technically different URLs. If your server treats them as the same resource but does not redirect one to the other, search engines may index both, splitting link equity. Always enforce a single canonical form via server-side redirects.
  • Double encoding. When a value is encoded twice, %20 becomes %2520. This typically happens when a framework or library automatically encodes a string that was already encoded. Parsing the URL here lets you spot these artifacts immediately.
  • Query parameter ordering. While the HTTP specification treats query parameters as unordered, some caching layers and API backends are sensitive to parameter order. If two URLs with the same parameters in different orders produce different cache keys, you may serve stale responses. Parsing and sorting parameters alphabetically is a common normalization step.
  • Fragment confusion. Fragments are client-side only — they never reach the server in the HTTP request. If your application relies on a hash value for server-side routing (a common mistake when migrating single-page apps), requests will silently drop the data you expected. Verify fragment handling by parsing the URL and checking whether the information you need is in the query string instead.
  • Mixed-case hostnames. Hostnames are case-insensitive per the DNS specification, but paths are case-sensitive on Unix-based servers. A link to /Blog/Post-1 will return a 404 if the actual path is /blog/post-1.

URLs in Different Contexts

The same URL can behave differently depending on where it appears. Understanding these contexts prevents subtle bugs:

  • Browser address bar. Browsers apply WHATWG URL parsing, which is more lenient than strict RFC 3986. Missing schemes are auto-completed, Unicode is displayed in decoded form, and punycode domains are shown in their IDN representation.
  • API requests. HTTP client libraries like fetch or axios require fully qualified URLs. Passing a relative path or forgetting the scheme will cause the request to fail or resolve against an unexpected base URL.
  • Redirects. When a server responds with a 301 or 302, the Location header must contain a valid absolute or relative URL. Malformed redirect targets cause redirect loops or broken navigation, especially when query strings and fragments are involved.
  • Canonical URLs. The <link rel="canonical"> tag tells search engines which version of a page is authoritative. It should be an absolute URL without query parameters (unless they change content), without fragments, and with a consistent trailing slash policy.
  • Sitemap entries. XML sitemaps require fully qualified, absolute URLs that match the canonical version exactly. Mismatches between sitemap URLs and canonical tags send conflicting signals to crawlers and can dilute indexing.

Parsing your URLs before using them in any of these contexts helps you catch problems early — before they become 404 errors, redirect chains, or SEO issues in production.

Related Tools

URL parsing is one step in a broader workflow. These companion tools handle the other pieces:

  • URL Encode/Decode — Convert between raw and percent-encoded strings. Useful when you need to encode query parameter values or decode a URL you received from an external system.
  • Slug Generator — Create clean, URL-safe path segments from titles or names. Handles Unicode transliteration, whitespace normalization, and special character removal so your paths are both human-readable and valid.
  • Base64 Encode/Decode — Some APIs embed binary data in URL query parameters using Base64 encoding. Decode those values here to inspect their contents, or encode data before appending it to a URL.

Frequently Asked Questions

What URL formats are supported?
Any valid URL with a protocol (http://, https://, ftp://, etc.). Relative URLs without a protocol are not supported.
Are query parameters decoded?
Yes. URL-encoded characters in query parameters are automatically decoded for readability.
Is my URL kept private?
Yes. This tool runs entirely in your browser. Your URL is never sent to any server.
Which URL components does it extract?
Scheme, host, port, path, query parameters, and fragment, per the WHATWG URL standard. Query strings are parsed into key/value pairs automatically, including repeated parameters.
Does it decode percent-encoded values?
Yes. Query values and path segments are percent-decoded in the display. If you need the raw encoded version, use our URL Encode / Decode tool.
Can I parse relative URLs?
Relative URLs need a base URL to resolve. Paste a full absolute URL (starting with `http://` or `https://`) for the parser to work correctly.

Related Tools