URL Parser

URLs (Uniform Resource Locators) identify resources on the web. This tool breaks down URLs into their component parts: scheme, host, port, path, query parameters, and fragment. It automatically decodes percent-encoded values, handles internationalized domain names (IDN) with Punycode conversion, and can detect embedded data like Base64 or JSON in parameters.

Specifications

Common Use Cases

  • Debug OAuth 2.0 redirect URLs and callback parameters
  • Inspect webhook URLs and their query parameters
  • Analyze tracking parameters (UTM, referrer data)
  • Decode mobile deep links (app://, custom schemes)
  • Troubleshoot URL routing issues
  • Convert internationalized domain names between Unicode and Punycode

Features

  • Parse all URL components (scheme, host, port, path, query, fragment)
  • Decode percent-encoded (URL-encoded) values automatically
  • Parse query string into key-value pairs
  • Convert internationalized domain names (IDN) between Unicode and Punycode
  • Detect and decode Base64 or JSON in parameter values
  • Copy individual components to clipboard

Examples

OAuth Callback

Try it →

An OAuth 2.0 authorization callback with code and state parameters.

https://app.example.com/callback?code=abc123&state=xyz789&redirect_uri=https%3A%2F%2Fexample.com

Internationalized Domain (Punycode)

Try it →

A URL with a Punycode-encoded domain name (xn-- prefix indicates IDN).

https://xn--mnchen-3ya.de/path

Internationalized Domain (Unicode)

Try it →

A URL with a Unicode domain name that will be converted to Punycode.

https://münchen.de/path

Tips

  • Percent-encoding replaces unsafe characters with %XX where XX is the hex value.
  • The fragment (#) is never sent to the server; it's client-side only.
  • Query parameters can appear multiple times with the same key.
  • Some characters like @ and : in userinfo require encoding.
  • Use encodeURIComponent() for parameter values, encodeURI() for full URLs.

Understanding URL

URLs (Uniform Resource Locators) are the addressing system of the web, defined by RFC 3986 as a specific type of URI (Uniform Resource Identifier). A URL consists of several components: a scheme (protocol like https), an authority (host, optional port, optional userinfo), a path, an optional query string of key-value parameters, and an optional fragment identifier.

Percent-encoding (URL encoding) is the mechanism for representing special characters in URLs. Characters outside the unreserved set (A-Z, a-z, 0-9, -, _, ., ~) must be encoded as %XX where XX is the hex value of the byte. Spaces become %20 (or + in query strings). Non-ASCII characters are first encoded as UTF-8 bytes, then each byte is percent-encoded.

Query strings carry parameters as key=value pairs separated by & characters. Web applications use these for search terms, pagination, filtering, sorting, and tracking (UTM parameters). OAuth 2.0 redirect URLs carry authorization codes and state tokens in query parameters. Complex values may themselves be URL-encoded, creating layers of encoding that require careful decoding.

Internationalized domain names (IDN) use Punycode encoding (RFC 3492) to represent non-ASCII characters in domain names. The xn-- prefix signals a Punycode-encoded label. For example, münchen.de becomes xn--mnchen-3ya.de. This encoding ensures compatibility with the ASCII-only DNS system while supporting domain names in any script.

JavaScript provides two functions for URL encoding that serve different purposes. encodeURI encodes a complete URI, preserving characters that have structural meaning in URLs (such as : / ? # @ and =). encodeURIComponent encodes a single URI component like a query parameter value, encoding all special characters including / and &. Use encodeURIComponent for parameter values and encodeURI only when encoding a complete URL. The fragment identifier (everything after #) is defined by RFC 3986 as client-side only — browsers use it for in-page navigation and client-side routing in single-page applications, but it is never included in HTTP requests sent to the server.

Punycode is the encoding that makes internationalized domain names possible within the ASCII-only DNS system. Domains containing non-Latin characters are stored in DNS using Punycode with an xn-- prefix, so münchen.de is stored as xn--mnchen-3ya.de. Browsers display the Unicode form to users while using the Punycode form for DNS resolution behind the scenes.

Query strings can contain multiple values for the same parameter name, such as ?color=red&color=blue. Different frameworks handle this differently — some return the last value, some the first, and some return an array of all values. This tool shows all parameter occurrences. In JavaScript, URLSearchParams.getAll() retrieves all values for a repeated key rather than just the first or last.

← Back to all tools