URL Parser
Split any URL into its parts: protocol, username and password, host, port, path, query string, fragment and origin. Query parameters are listed in a table with their decoded values.
The URL is split by your browser’s built-in URL parser. It is not opened, visited or sent anywhere.
How to Use the URL Parser
- Paste a full URL into the input, or press Load an example.
- Read each component in the URL components list. Percent-encoded parts also show a decoded version.
- Check the Query parameters table for each name and value, decoded.
- Copy the component summary, or copy the query parameters as JSON.
Examples
URL with query parameters and a hash
- Input
- https://shop.example.com:8080/products/red%20shoes?size=42&color=dark+red#reviews
- Output
- Protocol: https: Hostname: shop.example.com Port: 8080 Pathname: /products/red%20shoes (decoded: /products/red shoes) Hash: #reviews size = 42 color = dark red
Repeated parameter
- Input
- https://example.com/search?tag=a&tag=b
- Output
- tag = a tag = b
About the URL Parser
A URL packs a lot into one line. Breaking it apart helps when debugging redirects and API calls, checking tracking parameters on marketing links, reading a long link before you click it, or explaining URL structure to someone learning web development.
The tool uses the WHATWG URL parser built into your browser, the same one JavaScript’s new URL() uses. The host includes the port when one is set, while the hostname does not. The origin combines protocol, hostname and port, and is what browsers use for security checks. Query parameters are read with URLSearchParams, which decodes %20 and + to spaces.
If you leave out the protocol, https:// is assumed and you are told so. Browsers normalise URLs while parsing: hostnames are lowercased, default ports such as 443 are dropped and international domain names are shown in their Punycode (xn--) form. Invalid URLs show an error instead of a guess. The URL is never visited or sent to a server, so this tool cannot tell you whether a link is safe.
Frequently Asked Questions
What is the difference between host and hostname?
The hostname is just the domain, such as example.com. The host adds the port when one is given, such as example.com:8080.
Why is the port empty?
When a URL uses the default port for its protocol, such as 443 for https or 80 for http, the parser leaves the port empty. The tool notes which default port applies.
Are query parameters decoded?
Yes. Names and values in the table are decoded, so %20 and + become spaces and %40 becomes @. The raw query string is shown in the component list.
Does this tool visit the URL?
No. The URL is only split into parts in your browser. It is not opened, fetched or sent anywhere.
Why does it say my URL is invalid?
Common causes are spaces, a missing or misspelled protocol, or characters that are not allowed in a hostname. Encode spaces as %20 and include the protocol, for example https://.
Related Tools
All developer tools →Encode or decode URLs and query-string values safely.
Format and validate JSON directly in your browser.
Test JavaScript regular expressions with highlighted matches and capture groups.
Encode text to Base64 or decode Base64 back to readable text.