Campaign URL builder (UTM)

Add utm_source, medium, campaign and more to a link. Keeps your existing parameters. Nothing is sent or stored.

How it works

  1. Type the website URL and the utm_source
  2. Fill in medium, campaign and the other tags you use
  3. Copy the tagged URL

How the URL is put together

The page takes your website URL and adds up to six parameters in a fixed order: utm_source, utm_medium, utm_campaign, utm_term, utm_content and utm_id. Only utm_source is required, and a box left empty adds nothing. The URL must start with http:// or https:// and contain no spaces; a bare domain such as example.com/a gets https:// put in front, and the page says so. The sample opens on https://example.com/pricing?ref=home#plans with the source Newsletter, the medium email and the campaign Spring Sale, and the result is https://example.com/pricing?ref=home&utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale&utm_content=header_link#plans. The table under the answer lists each parameter and says whether it was added, kept or replaced.

Existing parameters and the fragment

Parameters already in the URL stay, in their original order, and the new utm_ ones follow them. If the URL already holds a utm_ parameter with the same name as one you fill in, the old one is removed and yours is used; a utm_ parameter you leave empty is not touched. Names are compared exactly, so UTM_Source is a different name from utm_source. A fragment (the part after #) stays at the end, and the parameters are placed before the #, because a browser never sends the fragment to the server. If the fragment itself contains a question mark, as in single-page-app routes like /#/page?x=1, that part is treated as fragment text. A warning appears when the finished link is longer than 2,000 characters.

Lower case, spaces and encoding

Force lower case is on by default and applies to the values you type, not to the website URL, because analytics reports treat Newsletter and newsletter as two different sources. Runs of spaces, tabs or line breaks in a value are replaced by one underscore, one hyphen or %20, whichever you pick. Everything else is percent-encoded as UTF-8 by the page's own encoder: letters, digits and - _ . ~ stay as they are, and every other character, including & = # ? + and a literal %, becomes %XX. An é becomes %C3%A9. Values are limited to 200 characters each.

What stays on your device

The link is built in this tab. Nothing you type is sent anywhere or stored on your device, and Reset or a reload brings the sample back. The page counts that a result was shown, without any of your text. The tool does not check that the link works and does not shorten it.

Frequently asked questions

Which UTM parameters are required?

Only utm_source is required by this page, because it says where the visit comes from. Analytics tools usually also want utm_medium and utm_campaign, so a link tagged with source, medium and campaign, such as newsletter, email and spring_sale, is the usual minimum. utm_term, utm_content and utm_id are optional.

Does it keep the parameters already in my URL?

Yes. A link such as https://example.com/pricing?ref=home keeps ref=home and gets the utm_ parameters added after it. If the link already has utm_source and you fill in utm_source here, the old value is dropped and yours is used, and the table marks it as replaced.

Why is the lower case option on by default?

Reports group by the exact text of a value, so Email, email and EMAIL appear as three rows. Lower case keeps them together. Turn it off if you need capitals, for example for a case-sensitive campaign id; it never changes the website URL itself.

Which should I pick for spaces: underscore, hyphen or %20?

Underscores and hyphens give links that read cleanly, such as spring_sale or spring-sale. %20 keeps the space as the browser would encode it. Whichever you choose, use it everywhere, because spring_sale and spring-sale are different campaigns in a report.

Where do the parameters go when the URL has a # part?

Before the #. Browsers do not send the fragment to a server, so parameters placed after it would never be seen by analytics. https://example.com/page#top becomes https://example.com/page?utm_source=...#top.

Is anything uploaded or saved?

No. The link is built in this tab, nothing is sent and nothing is kept on your device. Reloading the page puts the sample back.