Online URL Parser (Protocol, Host, Path, Query Parameters)

Paste a URL to see how it is built: protocol, host, hostname, port, path, query string, fragment and origin, plus every query parameter with its decoded and raw encoded form. Parsing happens as you type, entirely inside your browser; nothing is uploaded.

URL components
Component Value
Protocol —
Host —
Hostname —
Port —
Path —
Query string —
Fragment —
Origin —
Query parameters

This URL has no query parameters.

About this tool

A URL is made of several parts. The protocol (also called the scheme) tells the browser how to reach the resource, for example https: or ftp:. The host is everything between the protocol and the path — the hostname plus an optional port, such as example.com:8080. The path points to the resource on that host, the query string starts with ? and carries key=value pairs, and the fragment starts with # and identifies a location inside the document. The origin is the protocol plus the host, and it is what same-origin policies compare.

For example, https://shop.example.com:8080/products/list?color=red&page=2#reviews splits into protocol https:, host shop.example.com:8080, hostname shop.example.com, port 8080, path /products/list, query string ?color=red&page=2, fragment #reviews and origin https://shop.example.com:8080.

Query parameters are written key=value and joined with &. Only a small set of characters may appear literally in a URL, so spaces, Chinese characters, &, = and # are percent-encoded: 中 becomes %E4%B8%AD, and a space is often written as + inside the query string. The browser URL API decodes these when you read searchParams, which is why the decoded and raw values look different; the raw column shows exactly what was in the URL.

A URL is not one string but a set of components, and each one is interpreted differently by the browser, the server and the application behind it. The scheme decides how the resource is reached and implies a default port, so https means 443 and http means 80 unless a port is written explicitly. The host is case-insensitive and may be an internationalised domain that browsers silently convert to punycode, while the path is case-sensitive and is the part most routers use to pick a handler. User information before the host is technically allowed but almost never appropriate, and it is a common place for credentials to leak into logs.

The query string is the most misinterpreted part. It is a list of key and value pairs, but the format of that list is not defined by any standard: repeated keys, bracket notation such as filters[color], and order all behave differently depending on the server framework. Percent-encoding adds a second layer of confusion because in a query string a plus sign may mean a literal plus or a space, and the same byte can be written as %20 or +. That is why this tool shows every parameter twice, once decoded for humans and once raw for copy-paste, and keeps repeated keys separate instead of silently merging them into one value.

In day-to-day work the parser is useful for debugging redirects, cleaning tracking parameters out of a shared link, and checking what a webhook or analytics event will actually receive. Note that the fragment after the hash never reaches the server: it is consumed by the browser, which is why single-page applications encode routing state there, and why removing a fragment changes nothing for server logs. All of the work happens locally, so a URL containing a token, a signed download link or an internal hostname can be inspected without sending it anywhere.

How to use

  1. Paste a URL: type or paste a full address such as https://example.com/a?x=1. If you paste several lines, only the first line is parsed.
  2. Read the components: protocol, host, hostname, port, path, query string, fragment and origin are listed in order; empty parts such as a port or fragment show a placeholder.
  3. Inspect the parameters: each key is listed with its decoded value and its original encoded value, and every occurrence of a repeated key is shown.
  4. Check the decoded path: the line above the table shows the path after percent-decoding, which helps with URLs that contain Chinese characters or spaces.
  5. Copy what you need: Copy as JSON gives an object of the parameters, and Copy query string gives the encoded ?a=1&b=2 form.
  6. Paste the full URL including the scheme, then compare the decoded and raw parameter tables. If the two differ, the value was percent-encoded somewhere upstream and the raw form is what the server actually receives.
  7. To remove tracking noise, delete the utm_*, gclid, fbclid and similar keys, keep the functional ones, and rebuild the link from the remaining pairs rather than hand-editing the original string.

FAQ

Why does my URL fail to parse?

Because new URL() only accepts absolute URLs. Without a protocol the browser cannot tell whether example.com is a host or a path, so values such as example.com/page or /a/b?x=1 are rejected. Add https:// in front of the address.

What do + and %20 mean in a query string?

Both represent a space. Form data has traditionally encoded spaces as +, while percent-encoding uses %20. When you read searchParams the browser turns + back into a space, so the decoded value can contain a real space even though the raw column still shows +.

Why does the same key appear more than once?

Repeated keys such as ?tag=a&tag=b are valid, and URLSearchParams returns every value; this tool lists all of them. When copying as JSON, such keys become an array so that no value is lost.

Is the URL uploaded anywhere?

No. The string is parsed with the browser built-in URL API, and nothing is sent to a server or written to storage. As with any browser tool, extensions and clipboard managers may still read what you paste.

Can this tool convert URL encoding?

It shows both the decoded and the raw encoded form side by side, which is enough to inspect percent-encoding. To encode or decode arbitrary text, use the dedicated URL encode / decode tool.

Why does a plus sign sometimes become a space?

In the query string portion, HTML form encoding treats + as a space, while the rest of the URL treats it as a literal plus. So a value encoded with form rules shows a space after decoding, and a plus that was meant literally must be sent as %2B.

Why are repeated keys listed separately?

Nothing in the URL specification forbids the same key appearing more than once. PHP turns a repeated key into an array, some frameworks keep only the last value, and others keep the first. Showing every occurrence preserves what was actually sent instead of guessing which one the server will use.

What happens to the part after the hash?

It is never transmitted to the server. The browser keeps it and uses it to scroll to an element or, in a single-page application, to render a route. That also means it cannot leak to server logs, but it can be read by any script on the page.

Why does the parser reject my URL?

The most common causes are a missing scheme, spaces that were not encoded, and non-ASCII characters typed directly into the host. Add https:// at the front, encode the spaces as %20, and let the browser convert internationalised domains to punycode.