URL builder

What is an Url Builder?

Building URLs by string concatenation is a common source of bugs: a missing ?, a doubled &, or a parameter value containing spaces or ampersands that is not encoded. This builder assembles a URL from its parts and encodes every query parameter correctly, and it can also take an existing URL apart so you can edit it.

How to use it

  1. Enter the base URL, or paste a full URL to load its parts.
  2. Add, edit or remove query parameters as key and value pairs.
  3. Copy the finished URL.

Example: campaign link

Base https://example.com/pricing with parameters utm_source=newsletter, utm_medium=email and utm_campaign=Black Friday & more produces:

https://example.com/pricing?utm_source=newsletter&utm_medium=email&utm_campaign=Black%20Friday%20%26%20more

The space becomes %20 and the ampersand inside the value becomes %26, so it is not mistaken for a parameter separator.

Anatomy of a URL

https://[email protected]:8443/v1/items?sort=price&page=2#reviews

  • Scheme: https
  • Host and port: api.example.com:8443
  • Path: /v1/items
  • Query: sort=price&page=2
  • Fragment: reviews (never sent to the server)

Tips

  • In code, use the URL and URLSearchParams APIs instead of concatenating strings.
  • Keep UTM parameter values lowercase and consistent, or analytics will report Email and email separately.
  • Repeated keys such as tag=a&tag=b are valid; servers interpret them as lists differently.

Frequently Asked Questions

How do I add query parameters to a URL?

Add them after a question mark as key=value pairs separated by ampersands, with each value percent-encoded.

Why must parameter values be encoded?

Characters such as spaces, ampersands, question marks and hash signs have special meaning in URLs and would break the query string.

How do I build UTM tracking links?

Add utm_source, utm_medium and utm_campaign parameters, and optionally utm_term and utm_content, to the landing page URL.

Is the URL fragment sent to the server?

No. The part after the hash sign stays in the browser.