URL Parser and UTM Builder
Split a URL into its parts and build campaign links with UTM parameters.
| Protocol | https: |
|---|---|
| Username | user |
| Password | – |
| Hostname | xgm.ro |
| Port | 8443 |
| Path | /tools/email-security |
| Query | ?d=example.com&utm_source=newsletter |
| Fragment | #result |
| Origin | https://xgm.ro:8443 |
| Parameter | Decoded value |
|---|---|
| d | example.com |
| utm_source | newsletter |
Need to tag a link rather than take one apart? Build a UTM link in the same tool.
Related tools
About this tool
URL & UTM has two modes. Parse splits an address with the browser's own WHATWG URL parser and lists protocol, user name, password (masked), host, port, path, query, fragment and origin, with a second table of the query parameters after percent-decoding. Build a UTM link takes a landing page and the five utm_ fields, writes the ones you filled in, removes the ones you left empty, and warns about a missing utm_source, utm_medium or utm_campaign and about capital letters in any value. Neither mode contacts the address: nothing is requested, no redirect is followed, no status code is read and the page behind the URL is never loaded. To percent-encode a value by hand, use the Encoder instead.
Both modes run entirely in your browser, using the URL parser and serialiser the browser already has. The address you parse is never fetched, the campaign link you build is assembled locally, and neither the URL nor any utm_ field is sent to the XGM API, kept in this browser or written into the page address - the URL holds only the mode, as ?mode=utm, with the parser as the default that carries no parameter. A link you share therefore opens the right mode with the example values, never with your campaign. Copy, download and the JSON export are generated from the result on screen. The single request the page makes on its own is the page-view event sent after you accept analytics, which carries the path and the tool name and nothing you typed.
How to use it
- Open the URL & UTM tool.
- Paste or type the input you want to inspect.
- Read the result, which is computed in your browser; the input is not sent to XGM.
- Copy the output only after checking it looks correct.
- Use related XGM tools if you need a broader diagnostic view.
FAQ
I pasted a URL with no scheme. What did the parser assume?
Text is treated as already having a scheme only when it starts with something://, or with mailto:, tel:, data: or urn:; otherwise https:// is put in front. That is why example.com:8080/x is read as host plus port rather than as a scheme called “example.com”. If the result would have a host containing spaces, the input is rejected instead, because a host name never has them.
Why does the Path row show characters that are percent-encoded in my URL?
Path and query parameter values are shown decoded, so you can read what they actually say; if the path contains an escape that cannot be decoded it is shown raw rather than throwing. The Query row is the opposite: it is the raw query string as the parser stored it, leading ? included, so you can compare the two views.
My query string has the same parameter twice. Which value wins?
Neither - both are listed, in the order they appear, because the table iterates every entry the query string contains. A query string is a convention rather than a defined structure in RFC 3986, so the server at the other end decides: some frameworks take the first, some the last, some build a list. Seeing the duplicate is usually the point of the check.
What does the UTM builder do to a landing page that already has parameters?
Parameters that are not utm_ are kept as they are, the utm_ fields you filled in are set (replacing any value already there) and the ones you left blank are removed from the URL. The fragment stays at the end of the address. Values are written through the URL serialiser, so a space in a value is escaped rather than left literal - hyphens are easier to read in a report.
Why is it warning me about capital letters?
GA4 keeps campaign values exactly as they arrive, so “Email” and “email” become two rows and one campaign is reported as two. The check fires for any of the five fields that contains an uppercase letter, and a second warning names any of utm_source, utm_medium or utm_campaign you left empty, since untagged traffic groups badly. Both are advice: the link is still built and shown.