Skip to content

URL Parser & Inspector

Break a URL into its protocol, hostname, port, path, query parameters, hash fragment, origin and credentials.

Runs in your browser Free, no sign-up
Loading tool workspace...

What is URL Parser & Inspector?

URL Parser breaks a web address into its components so you can see exactly what each part is. Paste a URL such as https://user:pass@example.com:8080/docs/page?ref=github&sort=asc#intro and the tool shows the protocol (https:), hostname (example.com), port (8080), pathname (/docs/page), query string (?ref=github&sort=asc), hash (#intro), origin and any username and password, plus a table of the query parameters.

It is useful when a long tracking link, OAuth redirect or API URL is hard to read, or when you need to check what a browser will actually treat as the host, path and parameters.

How to use URL Parser & Inspector

  1. Paste a complete URL, including the scheme (https://).
  2. Read the parsed protocol, hostname, port, pathname, query string, hash, origin and credentials.
  3. Check the query parameters, shown decoded as key and value pairs.
  4. Copy any part you need.

Key features

  • Splits URLs into protocol, hostname, port, pathname, search, hash and origin
  • Shows embedded username and password credentials
  • Decoded table of query parameters
  • Uses the browser's standards-compliant URL parser
  • Instant results as you type

Common use cases

  • Reading long UTM tracking links and affiliate URLs
  • Checking OAuth redirect URIs and callback URLs for mismatches
  • Extracting the hostname or origin for CORS and allow-list configuration
  • Debugging API URLs with many query parameters
  • Teaching how URLs are structured

Technical details & standards

Parsing uses the browser's built-in URL API, which follows the WHATWG URL Standard, the same rules browsers use when following links. That means the results reflect real browser behavior: default ports are left empty (https uses 443 and http uses 80 without listing them), the hostname is lowercased, and international domain names are converted to their punycode form.

Query parameters are read with URLSearchParams, so percent-encoded characters are decoded and + is read as a space. If a key appears more than once in the query, the parameters table shows its last value; use the Query String Parser to see every value. A URL without a scheme, such as example.com/page, is rejected because it is not a complete URL.

Frequently asked questions

What are the parts of a URL?

A full URL has a scheme (https:), optional credentials (user:pass@), a host (example.com), an optional port (:8080), a path (/docs/page), an optional query (?key=value) and an optional fragment (#section). The origin is the scheme, host and port together.

What is the difference between the host and the origin?

The host is the domain plus any non-default port, such as example.com:8080. The origin adds the scheme, such as https://example.com:8080. Browsers use the origin for security decisions like CORS and cookies.

Why is the port empty for my URL?

Default ports are omitted: 443 for https and 80 for http. The port only appears when the URL specifies a different one, such as :8080.

Why is my URL rejected as invalid?

The URL needs a scheme. Add https:// to the front of addresses like example.com/page, and make sure there are no spaces or unencoded special characters in the host.

Is my data safe?

Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.

Does it work offline?

Once the page has loaded, this tool can process input without an internet connection.

More web & network tools

View all