URL Parser

Parse an absolute URL into scheme, host, port, path, query parameters and fragment, with optional percent-decoding.

  • Runs locally in your browser
  • No upload required

Try it

An absolute URL including its scheme and host.

Scheme
https
Host
example.com
Port
8443
Path
/a b/c
Query
q=hello%20world&lang=en
Fragment
section 1
Origin
https://example.com:8443
Query parameters
q=hello world lang=en
{
  "scheme": "https",
  "username": "user",
  "hasPassword": false,
  "host": "example.com",
  "port": "8443",
  "path": "/a b/c",
  "query": "q=hello%20world&lang=en",
  "fragment": "section 1",
  "origin": "https://example.com:8443",
  "params": [
    {
      "name": "q",
      "value": "hello world"
    },
    {
      "name": "lang",
      "value": "en"
    }
  ]
}

Supported formats

Input
url, text, boolean
Output
text, json

Privacy

Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.

Processing
In your browser
Privacy level
Browser only

Parsed https://example.com:8443 into 2 query parameter(s).

How it works

  • Applied the WHATWG URL parser to the absolute URL.
  • Read the scheme, user information, host, port, path, query and fragment.
  • Percent-decoded the path, parameter values/names and fragment.
  • Listed 2 query parameter(s) in order.
  • Internationalized hostnames are normalized by the platform parser (IDNA/punycode).

Methodology

  1. Apply the WHATWG URL parser to the input; a value without a scheme or host fails the standard's absolute-URL requirement.
  2. Read the serialized components from the parsed URL object: protocol, username, password-presence, hostname, port, pathname, search and hash.
  3. When decoding is enabled, percent-decode the path, each parameter name and value, and the fragment with a replacement-safe decoder.
  4. List query parameters in document order using the URLSearchParams iterator (decoded) or a raw split on '&' and the first '=' (undecoded).

Usage

  1. Paste an absolute URL (including http:// or https://).
  2. Choose whether to percent-decode the path, parameters and fragment.
  3. Read each component and the ordered query parameter list.

Examples

These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.

Decode a URL with a query and fragment

jsonSelect to copy
{
  "value": "https://user@example.com:8443/a%20b/c?q=hello%20world&lang=en#section%201",
  "decode": true
}

Keep the raw encoding

jsonSelect to copy
{
  "value": "https://example.com/path%2Fwith%20chars?x=1",
  "decode": false
}

Simple URL

jsonSelect to copy
{
  "value": "https://example.com/",
  "decode": true
}

Limitations

Absolute URLs only

A URL is absolute when it has a scheme and a host. Relative references such as /a/b or ../c depend on the document they appear in, so this tool refuses them rather than inventing a base. The WHATWG parser also normalizes the host (lower-casing and IDNA) and resolves dot segments in the path, which is why the parsed form can differ from the input spelling.

Decoding versus raw form

The raw form is what would be transmitted; the decoded form is what a receiver interprets. Both are useful: use the raw form to inspect encoding and signatures, and the decoded form to read parameter values. Decoding never changes the reported raw query string.

Frequently asked questions

Why is my relative URL rejected?
This tool reports a full component breakdown, which only an absolute URL has. Resolve the relative reference against a base URL first, then parse the result.
What does percent-decoding change?
It turns escapes such as %20 back into spaces and %2F back into slashes. Keep decoding off when you need the exact bytes that would travel on the wire.
Is my URL sent anywhere?
No. Parsing happens entirely in your browser and the tool does not collect or transmit the value.

Sources

  1. WHATWG URL Standard — WHATWG
  2. RFC 3986: Uniform Resource Identifier (URI): Generic Syntax — IETF
  3. MDN Web Docs — URL — MDN