URL PARSER
Break any URL into its protocol, host, port, path, query parameters, and hash, with every parameter laid out in a clean table.
| Protocol | https: |
| Hostname | www.example.com |
| Port | 8443 |
| Origin | https://www.example.com:8443 |
| Path | /blog/post |
| Query string | ?utm_source=newsletter&page=2 |
| Hash | #comments |
| Username | user |
| Password | pass |
| utm_source | newsletter |
| page | 2 |
How to parse a URL
- 1
Paste a full URL, including its scheme (https://).
- 2
The parser splits it into protocol, host, port, path, query string, and hash using the browser's own URL engine.
- 3
Every query parameter is listed separately in a key/value table, so you can read a long tracking URL at a glance.
Questions
- What's the difference between origin, host, and hostname?
- Hostname is just the domain (example.com). Host is the domain plus a non-default port (example.com:8443). Origin is the scheme, host, and port together (https://example.com:8443) — it's the value browsers use to decide whether two pages can talk to each other under the same-origin policy.
- Why does my URL show as invalid?
- The parser requires a complete, absolute URL with a scheme — https://example.com/path works, but example.com/path or //example.com/path (a protocol-relative URL) will be rejected, because the browser's URL constructor can't resolve them without a base URL to resolve against.
- Does this decode percent-encoded characters in the query string?
- Yes — each query parameter's value is decoded automatically, so %20 becomes a space and %3D becomes an equals sign, matching exactly what your browser or server would receive after decoding the request.
- Is the URL I paste sent anywhere?
- No. Parsing happens with the browser's built-in URL class entirely on your device — nothing is sent to a server, which matters if the URL contains a session token, API key, or other sensitive query parameter.