URL Parser / Builder

Break a Uniform Resource Locator (URL) into its components (scheme, host, port, path, query params, fragment) or assemble one from parts.

The parts of a URL, annotated

https://user@shop.example.com:8443/catalog/shoes?color=red&size=42#reviews

scheme     https
userinfo   user
host       shop.example.com
port       8443
path       /catalog/shoes
query      color=red&size=42   →   color = red, size = 42
fragment   reviews
  • The port is optional. Without it, https uses 443 and http uses 80.
  • The query starts at the first ?; parameters are separated by & and each is a name=value pair.
  • The fragment starts at # and stays in the browser. It is never sent to the server, so it does not appear in server logs.

Details that cause errors

  • Repeated parameters. ?tag=a&tag=b is valid; whether a server reads the first value, the last or both depends on its framework.
  • Encoded separators. An & or = inside a value must be written as %26 or %3D, otherwise it splits the value.
  • The host decides the destination. In https://example.com@evil.test/ the host is evil.test; the text before @ is user information. Phishing links use this form.
  • Case. Scheme and host are case-insensitive; path and query are case-sensitive on most servers.
  • Trailing slash. /catalog and /catalog/ are two different paths. A server may answer one with a redirect to the other.
  • IPv6 hosts are written in brackets: http://[2001:db8::1]:8080/.

Related tools

Monitor URL Parser / Builder automatically

Break a Uniform Resource Locator (URL) into its components (scheme, host, port, path, query params, fragment) or assemble one from parts. NetTests can run this check on a schedule, preserve historical results, compare changes over time, and alert you the moment something breaks.

Start monitoring free → See all monitoring products

Frequently Asked Questions

What does the URL parser do?

It breaks a Uniform Resource Locator (URL) into its individual components — scheme, host, port, query string, and fragment — and decodes each query parameter into a readable key/value list. This is handy for debugging redirects, tracking parameters, or understanding a long encoded link.

What are the parts of a URL?

A Uniform Resource Locator (URL) like https://user@host.example.com:8443/path/page?q=1&ref=x#section is made of:

  • scheme — https, the protocol.
  • userinfo — user, optional credentials.
  • host — host.example.com, the domain or Internet Protocol (IP) address.
  • port — 8443, defaults to 80/443 when omitted.
  • path — /path/page.
  • query — q=1&ref=x, the parameters after ?.
  • fragment — section, the part after # (never sent to the server).
What is URL encoding (percent-encoding)?

Characters that aren't allowed in a Uniform Resource Locator (URL) — spaces, &, =, non-ASCII text — are replaced with a % followed by their hex byte value. For example a space becomes %20 and @ becomes %40. The parser decodes these so you can read the real values.

Does the fragment (#) get sent to the server?

No. Everything after the # is the fragment and stays in the browser — it is never included in the HyperText Transfer Protocol (HTTP) request. It's typically used to scroll to an anchor or by single-page apps for client-side routing.