Skip to content
Free developer tool

URL parser

This URL parser splits a web address into its parts so you can see exactly what each piece is. It is useful for debugging links, redirects and API endpoints, or for checking which query values a URL really carries.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result
Private: runs on this device

Input

54 characters

Result

{
  "href": "https://example.com:8443/search?q=tea&q=coffee#results",
  "protocol": "https:",
  "origin": "https://example.com:8443",
  "hostname": "example.com",
  "port": "8443",
  "pathname": "/search",
  "username": "",
  "password": "",
  "query": [
    [
      "q",
      "tea"
    ],
    [
      "q",
      "coffee"
    ]
  ],
  "fragment": "#results"
}

Example

Input
https://example.com:8443/search?q=tea&q=coffee#results
Result
{
  "href": "https://example.com:8443/search?q=tea&q=coffee#results",
  "protocol": "https:",
  "origin": "https://example.com:8443",
  "hostname": "example.com",
  "port": "8443",
  "pathname": "/search",
  "username": "",
  "password": "",
  "query": [
    [
      "q",
      "tea"
    ],
    [
      "q",
      "coffee"
    ]
  ],
  "fragment": "#results"
}

How to use the url parser

  1. Paste a full URL, including a scheme such as https://, into the Absolute URL box.
  2. Set Password display to Hide password or Show supplied password.
  3. Press Run to see each part as JSON.
  4. Copy result or Download the breakdown.

How it works

The result lists href, protocol, origin, hostname, port, pathname, username, password, query and fragment.

Query pairs keep their order, repeated keys stay separate, and percent codes and + signs are decoded.

When a URL uses its scheme's default port, or has no port, the port shows as (default or none).

Relative links like /search?q=tea are rejected because they have no scheme.

The tool uses your browser's built-in URL parser, which may tidy the address, for example by lowercasing the host name. It never opens or visits the URL.

Everything runs in your browser. Your input is not uploaded or stored.

Questions and answers

Why does it ask for an absolute URL?

The parser needs a scheme such as https:// at the start. Add one to a relative link or a bare domain like example.com, then run it again.

Why is the password hidden?

A URL can carry a username and password before the host, like https://user:pass@host. The password shows as [hidden] unless you choose Show supplied password.

What is the difference between hostname and origin?

The hostname is just the domain, such as example.com. The origin adds the scheme and any non-default port, such as https://example.com:8443.

Does the tool visit the URL?

No. It only reads the text you paste, and nothing is sent anywhere.

All 100 SnowRock tools