DevTools Hub

Search tools

Search for a developer tool

Encoding

URL Parser

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

Part of the Encoding Toolkit
Components
Protocolhttps:
Usernameuser
Passwordpass
Hostnameexample.com
Port8443
Pathname/products/42
Search?ref=email&tags=sale&tags=new
Hash#reviews
Originhttps://example.com:8443
Path segments
products42
Query parameters(2)
  • ref = email
  • tags = sale, new

Need repeated keys grouped as JSON? Try Query String Parser in the related tools below.

Breaking a URL into its parts

A URL is more than a hostname and a path — protocol, credentials, port, path, query string, and fragment are all distinct components with their own rules. This tool uses the browser's own URL parser to split an absolute URL into each of those pieces, so you can see exactly what a server (or a library's new URL() call) would see.

The input has to be an absolute URL with a scheme — https://example.com/path, not just example.com/path or a relative path. For a deeper breakdown of just the query string — repeated keys grouped into arrays, exported as JSON — see Query String Parser.

FAQ

Why does Port show "(default: 443)" instead of a number?

When a URL doesn't specify a port explicitly, it uses the scheme's default — 443 for https:, 80 for http:, and so on. The URL itself doesn't contain that number, so it's shown as a note rather than the parsed value.

Why do path segments look decoded but Pathname doesn't?

Pathname shows the raw path exactly as the URL parser returns it, which can still contain percent-encoding like %20. The path segments below it are each decoded individually for readability.

Related tools