TheFileTools

How to split a URL into its parts and query parameters

Break a long web address into protocol, host, port, path and decoded query parameters to debug a link or see what it tracks.

A link copied from a newsletter or an app can run to several lines, most of it parameters. Read as one string, it is hard to see which page it opens and what is passed along.

Steps

  1. Open URL parser. An example address is already filled in.
  2. Replace it with your own address, including the https:// at the start.
  3. Read the rows. Each has a Copy button.

What the rows mean

  • Protocol: the scheme, such as https.
  • Host: the domain name, without the port.
  • Port: shown only when the address states one that is not the default for its protocol. For https on port 443 the row is absent.
  • Path: the part after the host, with percent-encoding decoded.
  • One row per query parameter, labelled with a question mark and the parameter name. Values are decoded, and a plus sign is shown as a space.
  • #: the fragment, the part after the hash sign, if there is one.

Worked example

The address https://shop.example.com/search?q=red+shoes&utm_source=news%20letter&tag=a&tag=b gives the host shop.example.com, the path /search and four parameter rows: q is red shoes, utm_source is news letter, and tag appears twice, once with a and once with b. Repeated parameters are kept in order, not merged.

When it shows an error

The message "Enter a full web address, for example https://example.com/page?x=1." appears when the scheme is missing. example.com/page alone is not accepted, so add https:// in front.

The tool works on the text only. It does not open the address, follow redirects or check that the page exists, and nothing you paste is sent anywhere. That makes it a safe way to inspect a suspicious link: you can see the real host without visiting it.

Related tools

To encode a value before putting it into a parameter, or to decode a single piece, use URL encoder / decoder. To hand a cleaned-up link to people on paper or on a screen, turn it into a code with QR code generator.