URL Parser
Split a URL into protocol, user name, password, host, port, path, query and hash, see each query parameter decoded, and whether the port was written. How it works
Use the URL Parser
Include the scheme (https://). Up to 20,000 characters; parsed in this browser.
- This URL contains a user name or password. Anyone who sees the link sees them; do not share it, and prefer headers or tokens.
Written as p%40ss
Written in the URL (not the scheme default).
Query parameters (4)
| # | Key | Value (decoded) |
|---|---|---|
| 1 | tag(repeated, 2 times) | red |
| 2 | tag(repeated, 2 times) | blue |
| 3 | q | hello world |
| 4 | empty | (empty) |
About the URL Parser
The URL parser splits https://user:p%[email protected]:8443/docs/a%20b?tag=red&tag=blue&q=hello+world&empty=#section-2 into protocol https:, username user, password p@ss, host www.example.com, port 8443, path /docs/a%20b, four query parameters and hash #section-2. It uses the browser’s own URL parser, which follows the WHATWG URL Standard, and lists each query parameter decoded: q is “hello world” because + stands for a space in a query.
The default URL, part by part
| Part | What the parser shows |
|---|---|
| Protocol | https: |
| Username | user |
| Password | p@ss (written as p%40ss) |
| Host | www.example.com |
| Port | 8443 (written in the URL) |
| Path | /docs/a%20b |
| Query | ?tag=red&tag=blue&q=hello+world&empty= |
| Hash | #section-2 |
| Origin | https://www.example.com:8443 |
A user name or password in a URL gets a warning: anyone who sees the link sees them.
Its query parameters, decoded
| # | Key | Value (decoded) |
|---|---|---|
| 1 | tag | red |
| 2 | tag | blue |
| 3 | q | hello world |
| 4 | empty | (empty) |
A repeated key is listed each time, in order, and marked “repeated, 2 times”.
Ports: written in the URL or the scheme’s default
| URL | Port shown | Written in the URL | Origin |
|---|---|---|---|
| https://example.com/ | 443 | No | https://example.com |
| https://example.com:443/ | 443 | Yes | https://example.com |
| http://example.com:8080/ | 8080 | Yes | http://example.com:8080 |
| wss://example.com/chat | 443 | No | wss://example.com |
| mailto:[email protected] | (none) | No | null |
Default ports in the WHATWG URL Standard: http 80, https 443, ws 80, wss 443, ftp 21. The browser drops a port equal to the default, so the parser reads the typed text to tell :443 from no port.
Frequently asked questions
- What are the parts of a URL called?
- The WHATWG URL Standard names them scheme, username, password, host, port, path, query and fragment. The browser’s URL object, and this parser, call the scheme the protocol and write it with its colon (https:), and call the fragment the hash (#section-2).
- Why does the port say 443 when my URL has no port?
- Because https uses port 443 when none is written. The parser shows the port that will be used and says whether it was written: https://example.com/ and https://example.com:443/ both show 443 and have the same origin, https://example.com.
- How are query parameters decoded?
- The query is split at each & and then at the first =, + becomes a space and %XX codes become characters, as the URL Standard does for form data. In the default URL q=hello+world is “hello world”, tag appears twice (red, then blue) and empty= has an empty value. The first 200 parameters are listed.
- Why does the parser say my URL is not complete?
- It needs an absolute URL with a scheme. example.com/path gets a button that adds https:// and parses https://example.com/path; a relative address such as /a?x=1 has no host to split; and https://example.com:99999/ is rejected with “Port 99999 is above 65535.”
- How do I see an international domain name?
- Paste it as it is. https://münchen.de/ gives the host xn--mnchen-3ya.de, the punycode form that goes over the network, plus a Host (Unicode) row with münchen.de.
- What is the origin of a URL?
- Its scheme, host and port together, the part browsers use to decide whether two pages may share data: https://www.example.com:8443 for the default URL. An address with no web host, such as mailto:[email protected], has the origin null.
Related Tools
View all toolsSubnet Mask Calculator
Subnet calculator for IPv4: enter an address and a mask or prefix such as /24 to get the network, broadcast address, host range, usable hosts and wildcard mask.
CIDR Calculator
Enter an IPv4 CIDR block such as 192.168.1.0/24 for its IP range, netmask, broadcast address and usable hosts, split it into subnets or turn a range into CIDR.
JWT Decoder
Paste a JSON Web Token to read its header, its payload and the exp, nbf and iat times in UTC. The signature is shown but not checked: nothing is verified.
Query String to JSON
Paste a query string or a full URL to get JSON: repeated keys and key[] become arrays, + and %20 decode to spaces, with optional nesting and number types.
JSON to Query String
Turn a JSON object into a URL query string: arrays as repeated keys, [], [0], a comma list or JSON, nested objects as user[name], user.name or JSON.
UTM Builder
Build a campaign URL with utm_source, utm_medium, utm_campaign, utm_id, utm_term and utm_content. Source, medium and campaign are required.