Skip to content

Parse an absolute URL into its protocol, host, path, query, and other components locally.

Loading tool

About URL Parser

Splits an absolute URL into protocol, username, password, hostname, port, path, query string and fragment using the browser's WHATWG URL parser, plus derived values like origin, host, decoded path segments and the effective default port. Every component and query parameter is editable and the URL is rebuilt as you type; parameters can be added or removed, and the query is also shown as JSON with repeated keys grouped into arrays.

Common uses

  • Read the parameters of a long tracking or OAuth redirect URL
  • Edit or remove a query parameter without hand-editing encoding
  • Check the origin of a URL when configuring CORS
  • Decode percent-encoded path segments

FAQ

What is the difference between host and hostname?
hostname is just the domain or IP, such as example.com. host includes the port when one is specified, such as example.com:8443.
What is a URL's origin?
The origin is the scheme, hostname and port together, for example https://example.com:8443. Browsers use it for the same-origin policy and CORS.
Why is my URL invalid?
The parser requires an absolute URL with a scheme. 'example.com/path' fails; 'https://example.com/path' works.
Is the fragment sent to the server?
No. The part after # is handled by the browser and is not included in the HTTP request.