URL parser
Parse a URL into its separate constituent parts (protocol, origin, params, port, username-password, ...)
About URL parser
Splits a URL into its parts, protocol, username and password, hostname, port, path, query string and hash, and lists every query parameter separately, using the same URL parser as your browser.
When you would use it
- Reading a long tracking or OAuth redirect URL to see which parameters it actually carries.
- Checking whether a URL built by your code has the host, port and path you intended.
- Extracting the host or a single parameter value without counting characters by hand.
How to use it
- Paste the full URL, including the scheme such as https://.
- Read each component in its own field; the copy button next to each one copies just that part.
- Scroll down to the parameter table for the decoded value of every query key.
Things worth knowing
- The URL must be absolute. A bare path such as /api/users or a host without a scheme is reported as invalid; prepend https:// to parse it.
- Port is empty when the URL uses the default port of its scheme (80 for http, 443 for https), because the browser parser normalises it away.
- Parameter values in the table are percent-decoded, while the raw query string field shows them exactly as written.
- A key that appears several times (?tag=a&tag=b) is shown once with its last value in the table. Use the raw query string to see all occurrences.
Frequently asked questions
- Why does the hostname lose its uppercase letters?
- Host names are case-insensitive, so the parser lowercases them. Internationalised domain names are also converted to their punycode (xn--) form.
- Where are the username and password used?
- They are the credentials embedded as user:password@ before the host, an old HTTP feature. Browsers mostly ignore them today, and you should never share URLs that contain real credentials.