A web address looks like one long word, but it is really a small sentence with a strict grammar. Each part has a job, the parts always arrive in the same order, and once you can point at each one, links stop being mysterious.

This guide explains every part in plain words, using one example address throughout. When you want to see the parts of a real link you have in front of you, the free URL Parser on Ovatly will split it for you without ever visiting the page.

Contents

  • Quick answer
  • One address, used for every explanation
  • The protocol: how the browser should talk
  • Username and password: the parts you should rarely see
  • Hostname and host: two names for nearly the same thing
  • The port: written, or quietly the default
  • The path: the route inside the site
  • Query parameters: extra instructions after the question mark
  • The fragment: a jump target inside the page
  • How to see the parts of any URL, step by step
  • Limitations and honest tradeoffs
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

A URL is built from these parts, in this order: the protocol (how the browser should talk, such as https:), an optional username and password, the hostname (the domain), a port (written, or the scheme's default), the path (the route inside the site), query parameters (name and value pairs after the question mark), and a fragment (a section name after the hash sign). Paste any address into the URL Parser and it lists each part it finds.

One address, used for every explanation

Most real addresses use only some of the parts, so this guide uses one address that contains everything:

https://user:[email protected]:8080/path/to/page?x=1&y=two#section

It is longer than the links you meet daily, and that is the point: every section below explains one piece of it. Shorter URLs simply leave pieces out.

The protocol: how the browser should talk

The protocol, also called the scheme, is the first part: https: in the example. It tells the browser how to talk to the server: which language of request to use and, as the port section explains, which standard port applies when the address does not name one.

You will meet https: on ordinary web pages and http: on older ones. Paste a bare domain with no protocol at all and https is assumed; the parser says so rather than guessing silently.

Username and password: the parts you should rarely see

In the example, user:pass@ sits between the protocol and the hostname. That is a username and a password, embedded in the address itself: user is the username, pass is the password.

This is an old pattern, still used for FTP links and some API endpoints. It is convenient for machines but a poor idea for anything people handle: anyone who sees the link sees the credentials, so an address built this way should never be shared publicly. Most URLs you meet have no such part, and when the parser shows one, that is worth your attention.

Hostname and host: two names for nearly the same thing

The hostname is the domain alone: example.com in the example. It names the site, the way a street address names a building.

The host sounds identical but means slightly more: it is the hostname plus the port, when a port is written. Because the example writes port 8080, its host is example.com:8080. When no port is written, host and hostname are the same string. The parser shows both, so you never have to guess which one an error message is asking for.

The port: written, or quietly the default

The port is the number after the hostname: 8080 in the example. It selects which service on the server should answer, the way an extension number selects a desk inside a building whose street address is the hostname.

Most addresses write no port at all, because every scheme has a standard one: 443 for https and 80 for http. The port still applies; it is simply implied. The parser makes the implied value visible, showing the standard port for the scheme and labeling it as the default, so the breakdown never leaves a gap where the port should be.

The path: the route inside the site

The path is the part after the host: /path/to/page in the example. If the hostname is the building, the path is the route to a particular room: it names the page or resource within the site.

The parser shows the path decoded, in readable form, rather than in the percent-encoded form addresses sometimes carry. An address with nothing after the hostname has an empty path, which means the root of the site; when the parser rebuilds such an address, it writes that root as a trailing slash, the way browsers do.

Query parameters: extra instructions after the question mark

Everything after the question mark is the query string: x=1&y=two in the example. It is a list of parameters, each a name and a value joined by an equals sign, with ampersands between pairs. Here there are two: x with the value 1, and y with the value two.

Parameters carry the extra instructions a page needs: a search term, a page number, a tracking code. They are read by name, and the same name can appear twice: an address can carry tag=a&tag=b, and the parser keeps both rows in order rather than discarding one. Values are shown decoded when you read them: a value that contained a space would be shown with the space visible, then written back as + if the address is rebuilt.

The fragment: a jump target inside the page

The last part, #section in the example, is the fragment. It names a section within the page, so a link can deliver you to a place inside the page, not just to its top. Everything after the hash sign belongs to the fragment, which is why it always comes last.

How to see the parts of any URL, step by step

  1. Paste a URL in the box. A bare domain works too; https is assumed and the parser says so.
  2. Read the component breakdown, including the decoded path and the port that applies.
  3. Scroll to the editor to change the host, path, port or fragment.
  4. Add, edit or remove query parameters in the table, then copy the rebuilt URL.

The editor in steps 3 and 4 is optional, but a good test of understanding: change one part, rebuild, and check the new address is the one you meant to write.

Limitations and honest tradeoffs

The parser explains the address as text, and that is all it does. It does not visit the URL, so it cannot confirm that the site exists, that the page still lives at that path, or that the parameters do what their names suggest. A part can be perfectly formed and point at nothing.

Names can also mislead. A parameter called page might not control pagination on a given site; the parser shows you the structure of the address, not the intentions of the site that receives it. Treat the breakdown as an accurate map of the link; the site itself is the authority on what each part does there.

Common mistakes

  • Treating host and hostname as interchangeable. They differ exactly when a port is written, which is when the distinction matters most.
  • Reading a missing port as no port. The default applies whether it is written or not: 443 for https, 80 for http.
  • Forwarding a link that contains credentials. If an address shows a username and password, the link itself is a secret, whatever page it opens.
  • Assuming a repeated parameter is a typo. Repeated keys are legitimate, and order is preserved. Check what the receiving system expects before tidying them away.

FAQs

What is the difference between host and hostname? The hostname is the domain alone (example.com). The host includes the port when one is present (example.com:8080). Both are shown in the breakdown.

What port does a URL use if no port is written? The standard port for the scheme: 443 for https and 80 for http. The parser shows that port in the breakdown and labels it as the default.

Can the same parameter appear twice in one URL? Yes, and the parser keeps both rows in order. Many systems accept repeated keys, for example tag=a&tag=b.

Why does a URL sometimes contain a username and password? Some URLs embed credentials before the host, like https://user:[email protected]. It is an old pattern still used for FTP links and some API endpoints. Avoid sharing such URLs publicly.

Does the URL Parser open the page to inspect it? No. It only reads the text you paste, in your browser. Nothing is fetched or uploaded, so the page is never visited.

Conclusion

Every address you will ever meet is assembled from the same short list of parts: protocol, sometimes credentials, hostname, port, path, parameters and fragment. Learn to see them and you can read any link at a glance. The URL Parser will do the splitting for you whenever an address is too long to parse by eye, and our companion guide on how to break a URL into its parts puts that breakdown to work, editing and rebuilding an address step by step. For more guides in this series, see the URL and Link Tools guides.