URL Parser
Break a URL into host, path and query parts.
Enter a full URL (including http:// or https://) and press Parse.
What is this tool?
The URL parser breaks a URL into its protocol, hostname, port, pathname, hash and query parameters. Useful for inspecting API request URLs or checking query string structure. It uses the browser's built-in URL object.
What each field means
- Protocol: the scheme including the colon, e.g.
https:. - Hostname: the domain or IP address, without the port.
- Port: the port explicitly specified in the URL; empty if omitted.
- Query parameters: each
key=valuepair after?shown as a row; repeated keys appear as separate rows.
Privacy & processing
All parsing uses only the browser's built-in URL object. Your URL is never uploaded or stored.
URL structure — the 5 standard components
Per RFC 3986, a URL (URI) is made of five parts: scheme, authority, path, query, and fragment. The authority further splits into userinfo, host, and port. Breaking down https://user@a.com:8080/p/q?x=1#h gives:
| Component | Value | Meaning |
|---|---|---|
| Scheme | https: | The protocol prefix |
| Authority | user@a.com:8080 | Userinfo + host + port |
| Path | /p/q | Resource location on the server |
| Query | ?x=1 | key=value parameters sent to the server |
| Fragment | #h | Client-only location, never sent to the server |
This tool splits these five parts precisely using the browser's built-in URL object. The fragment's key difference: it never leaves the browser.
Why percent-encoding exists, and the + vs %20 trap
The URI spec treats only letters, digits, and a few symbols (-._~) as safe; spaces, non-ASCII text, and characters with special meaning like &, ?, # must be percent-encoded (% plus two hex digits). Skip this and an & can be misread as a parameter separator, or a space can truncate the URL mid-parse.
encodeURIComponent(' ') produces %20, but form-encoded query strings (application/x-www-form-urlencoded) treat + as a space instead. A literal + (like the one in user+tag@a.com) must be encoded as %2B or it gets decoded as a space — confirmed by new URLSearchParams('q=a+b').get('q') returning 'a b'.