Skip to main content
CalcChef

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)

#KeyValue (decoded)
1tag(repeated, 2 times)red
2tag(repeated, 2 times)blue
3qhello world
4empty(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

PartWhat the parser shows
Protocolhttps:
Usernameuser
Passwordp@ss (written as p%40ss)
Hostwww.example.com
Port8443 (written in the URL)
Path/docs/a%20b
Query?tag=red&tag=blue&q=hello+world&empty=
Hash#section-2
Originhttps://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

#KeyValue (decoded)
1tagred
2tagblue
3qhello world
4empty(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

URLPort shownWritten in the URLOrigin
https://example.com/443Nohttps://example.com
https://example.com:443/443Yeshttps://example.com
http://example.com:8080/8080Yeshttp://example.com:8080
wss://example.com/chat443Nowss://example.com
mailto:[email protected](none)Nonull

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 tools