URL Parser & Validator
Parse any URL into its protocol, host, port, path, query parameters and hash using the browser’s own URL engine, with a plain breakdown of every part.
Tool guide
What this tool does
URL Parser & Validator parses a URL into every component part, protocol, hostname, port, path, query string (with each parameter listed individually), hash and origin, using the browser’s built-in WHATWG URL parser, and flags plain, unencrypted HTTP links.
A URL packs a surprising amount of structure into one string: protocol, host, an optional port, a path, a query string that might carry several parameters, and an optional hash fragment, each with its own parsing rules that are easy to get subtly wrong by hand.
This tool parses a URL using the browser’s own built-in WHATWG URL API, the exact same parser used by fetch() and modern JavaScript tooling, breaking it into every component part and listing each query parameter individually, so you can see exactly how a URL will actually be interpreted.
How to use URL Parser & Validator
- Enter the full URL, including its protocol (e.g. https://).
- Review the parsed Protocol, Host, Path, Query string and Hash.
- Check the individually listed query parameters if the URL has any.
- Note the HTTP warning if the URL isn’t using HTTPS.
Tips for better results
- A URL without an explicit protocol (like just "example.com") will fail to parse; add https:// (or the appropriate protocol) first.
- The Origin (protocol + host) is especially useful for understanding same-origin policy behaviour in web development, two URLs with the same origin are treated as the "same site" by browsers.
- Query parameters are listed individually and already URL-decoded, so you can read their actual values directly rather than their percent-encoded form.
- An HTTP (not HTTPS) URL is flagged explicitly, since traffic to it travels unencrypted and can be intercepted or altered in transit.
Common use cases
- Debugging a malformed or unexpectedly-behaving URL in an application.
- Extracting and reviewing query parameters from a long tracking or API URL.
- Confirming a URL’s protocol, host and port before using it in code or configuration.
- Checking whether a URL is using secure HTTPS before sharing or trusting it.
Common mistakes to avoid
- Omitting the protocol and assuming the parser will infer https:// automatically; a bare domain without a protocol is not a valid URL by this standard and needs one added explicitly.
- Confusing the path with the full URL when building links programmatically; the Path shown here is only the portion after the host, not including the query string or hash.
- Trusting an HTTP link for anything sensitive; the explicit warning here is a reminder that unencrypted HTTP traffic offers no protection against interception or tampering.
Frequently asked questions
Why does my URL fail to parse?
Most commonly a missing protocol, add https:// (or http://, etc.) to the start if it’s not already there; the WHATWG URL parser requires an explicit protocol to parse a string as a valid URL.
What’s the difference between Host and Hostname?
Hostname is just the domain name; Host includes the port too, if one is explicitly specified (e.g. example.com:8080).
Are query parameters automatically decoded?
Yes, each listed parameter’s value is already URL-decoded (percent-encoding resolved), showing the actual value rather than its encoded transport form.
What parser does this use?
The browser’s native, built-in URL API, implementing the WHATWG URL Standard, the same parser used internally by fetch() and most modern JavaScript tooling.
Feedback & suggestions
Help us improve URL Parser & Validator. We read every message.