URL Parser

Break a URL into its protocol, host, port, path, query parameters and fragment.

URL
Parts
Runs locally in your browser

About the URL Parser

A long URL hides its structure: which part is the host, whether there is a port, what the query parameters are and what they decode to. This parser uses the browser's own URL implementation, the same one that follows links, to split a URL into its components and list every query parameter with its decoded value. A URL without a scheme is treated as https.

The component names follow the URL standard, which holds a few surprises. The protocol includes its trailing colon (https:), the host carries the port while the hostname does not, and the port is reported as empty whenever it is the default for the scheme, so https://example.com:443/ and https://example.com/ parse identically. The fragment after # is listed because it matters to the page, even though a browser never sends it to the server.

The everyday use is debugging: a ticket includes a link that lands somewhere unexpected, and seeing the path and each parameter on its own line shows whether a tracking value or a stray encoded character is to blame. Percent-encoding and plus signs are decoded in the parameter list, so you read the value the server would receive. To edit the query string as data, use Query String to JSON; to encode a value for a URL, URL Encode.

How to use

  1. Paste the URL.
  2. Read each component and the decoded parameters.
  3. Use Query String to JSON to work with the parameters as data.

Common questions

Do I need the https:// prefix?
No. Without a scheme the URL is treated as https.
Are the query values decoded?
Yes, percent-encoding and + signs are decoded in the parameter list.
What is the origin?
The scheme, host and port together, which is what browsers use for security boundaries.