URL Parser

Break a URL into protocol, host, port, path, query and hash.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

URL parser

Every web address packs several pieces of information into one string: the protocol, the host, an optional port, the path, a query string and a fragment. This parser splits any absolute URL into those parts using the browser’s native URL API, so the breakdown matches exactly how browsers and servers interpret the address — handy for debugging links, reading long tracking URLs, or building integrations.

How it works

The tool constructs a URL object from your input and reads its standard properties: protocol (e.g. https:), optional username and password, hostname, port, origin (scheme + host + port), pathname, search (the raw query string) and hash (the #fragment). It then walks the query string with URLSearchParams, percent-decoding each parameter, and lists the individual key–value pairs. Because the API needs an absolute URL, the input must include a scheme such as https://.

Example

Parsing https://shop.example.com:8443/products?id=42&ref=email#reviews produces:

ComponentValue
Protocolhttps:
Hostnameshop.example.com
Port8443
Originhttps://shop.example.com:8443
Path/products
Query?id=42&ref=email
Fragment#reviews

The query parameters are listed separately as id = 42 and ref = email.

Everything runs in your browser using the built-in URL API, and nothing is uploaded.

Ad placeholder (rectangle)