Skip to main content
Tools Star Hub

SEO & Utilities

How to Read the Parts of a URL

By Tools Star Hub Editorial Team · Published

Paste one absolute http or https URL. The page splits it into protocol, hostname, port, path, fragment, and each query parameter. Parsing stays in the browser. The link is not opened.

A query string and a fragment look similar in a long link, and the same key can appear twice. This page lists those parts. It does not percent-encode the text, and it does not add campaign tags. Those jobs belong to the URL Encoder and the UTM Builder.

How to read the parts of a URL

  1. Paste a URL that includes http:// or https://. A path such as /docs/page is rejected. A broken URL such as http://[ is rejected. Other protocols are rejected too.
  2. Press Parse. Read the protocol without the colon, the hostname, the port, the path, and the fragment without the hash mark.
  3. Read each query row. Each key is its own row. A key with nothing after the equals sign stays, with an empty value. Duplicate keys stay as separate rows.
How to Read the Parts of a URL — Tools Star Hub

Example

A port, a repeated key, and a fragment

https://example.com:8080/docs/page?topic=a&topic=&ref=hub#section is protocol https, hostname example.com, port 8080, path /docs/page, and fragment section. The query rows are topic = a, topic with an empty value, and ref = hub.

A plain path and an internationalized name

https://example.com/docs has no port, no fragment, and no query rows. https://bücher.example/path returns the hostname xn--bcher-kva.example.

FAQ

Why is the hostname a string of letters and dashes?
An internationalized name is shown the way the URL parser encodes it.
Is the fragment a query parameter?
No. The part after # is the fragment.
Does this change the link?
No. It only reads the parts. Encoding is a separate tool.
What is rejected?
A missing protocol, a URL that is not http or https, and a string the browser cannot parse.

To split an absolute URL into its parts, use the URL Parser.