URL Parser

Split a URL into protocol, host, path, query parameters, and fragment.

Long links with tracking parameters are hard to read by eye. This tool splits a URL into protocol, username, host, port, path, query string and fragment, then lists each query parameter on its own line, decoded. Good for debugging redirects, callbacks and campaign links.

How to use it

  1. Paste a URL.
  2. Read the separate parts.
  3. Check the decoded parameters.
  4. Copy what you need.

When it helps

  • Checking tracking parameters in a link.
  • Debugging redirects and OAuth callbacks.
  • Understanding a complicated address.
  • Pulling out the domain or path.

Good to know

  • If you leave out the protocol, https is assumed.
  • Repeated parameter names are all listed, not collapsed.
  • Look for utm_ parameters to see how a campaign is being tracked.

Parts of a URL

A URL such as https://user@example.com:8080/blog/post?id=42#comments has a scheme (https), optional credentials, a host (example.com), an optional port, a path, a query and a fragment. The origin is the scheme, host and port together, and it's the unit browsers use for security rules.

The tool reads these using the browser's own URL parser, so it matches how real browsers interpret addresses.

Worked example: a tracking link

Paste a long marketing link and you'll see the domain, the path and each tracking parameter separately. That's an easy way to find what data a link passes along, such as campaign names or user identifiers.

You can also spot suspicious links by checking the real host: in https://example.com.evil.net/login, the host is evil.net, not example.com.

Encoding details

Unsafe characters in URLs are percent-encoded, with each byte written as a percent sign and two hex digits. Non-English domain names use punycode, so a name with accents may start with xn--. The tool shows the form your browser uses.

When building links in code, use a URL library rather than concatenating strings, so encoding stays correct.

Spotting suspicious links

Phishing links often use a trusted name as a subdomain, such as paypal.com.secure-login.example, where the real host is the last two parts. Look at the host, not the start of the address. Be wary of links with unusual ports, many hyphens, or an at sign in the middle.

When in doubt, type the site's address yourself instead of following the link.

Relative and absolute URLs

An absolute URL includes the scheme and host. A relative one, like /images/logo.png or ../page, depends on the current page. The tool treats input without a scheme as an https address, so paste full addresses for the best results.

In code, resolve relative paths against a base with the URL constructor instead of joining strings.

Parsing in code

In JavaScript, new URL(address) gives the same breakdown as this tool, and searchParams reads query values. Using the built-in parser avoids bugs from splitting strings by hand.

Questions

What's a fragment?

The part after #, used to jump to a place on a page.

Is the password shown?

Only a note that one exists.