URL Parser
Break an absolute URL into protocol, hostname, port, pathname, query parameters, and fragment using the browser URL parser.
What this tool is for
Break an absolute URL into protocol, hostname, port, pathname, query parameters, and fragment using the browser URL parser.
How to use
- Paste a complete
URLincluding `http://` or `https://`. - Run the parser and inspect each structural component.
- Review decoded query values separately before changing or forwarding the
URL.
Example
Parse `https://example.com:8443/docs?id=42#install` and verify the explicit port, pathname, query value, and fragment.
FAQ
Does it fetch the URL?
No. It only parses the string in the browser.
Why is a relative path rejected?
A relative path needs a base URL; this tool requires an absolute URL to avoid guessing.
Reproducible examples
Known inputs and expected results
Run these examples in the workspace above and compare the result with the documented output.
Absolute URL with port
- Input
- https://example.com:8443/docs?id=42#install
- Options
- Parse as an absolute WHATWG
URL. - Action
- Inspect every returned component.
- Expected output
- Protocol https:, hostname example.com, port 8443, path /docs, id=42, and hash #install.
- Explanation
- Hostname excludes the port while host includes it.
Repeated query keys
- Input
- https://example.com/search?tag=red&tag=blue&empty=
- Options
- Keep repeated values and an explicit empty value.
- Action
- Parse the query list.
- Expected output
- tag has red and blue entries; empty is present with an empty
string. - Explanation
- Converting directly to a one-value
objectwould lose information.
Error or unsupported case
Relative or unsafe input
- Input
- /docs?id=42
- Expected error or limit
- Without a base
URLthis is not an accepted absoluteURL. - Safer alternative
- Provide the full https://
URLor resolve the relative path against a known trusted base first.
When not to use this tool
- DNS, redirect, availability, or security checks
- Resolving relative URLs without an explicit base
Algorithm and assumptions
Parsing uses the browser WHATWG URL class; host and hostname/port are distinct, repeated URLSearchParams are retained, and default ports may normalize away.
Input and output
Input is an absolute URL. Output separates standard URL components and query parameter rows.
Supported formats and behavior
- HTTP and HTTPS URLs
- Explicit ports, paths, queries, and fragments
- Repeated query keys
Limits
- No DNS, redirect, availability, or safety check
- International domains may be displayed in punycode
Edge cases and common errors
- Default ports can be normalized away
- Repeated query keys must not be collapsed accidentally
- Credentials embedded in URLs are sensitive and should not be pasted
Release testing
Release checks cover ports, repeated parameters, fragments, Unicode encoding, missing schemes, malformed URLs, empty input, and clear/copy behavior.
Privacy boundary
The input and result stay in this browser session. ZZP Box does not upload or store the values entered in this tool.
Related reviewed tools
Choose the next tool by the operation you need, then review that page's stated input and limits.
