UTM builder — tag campaign links without breaking the URL

Paste the page address, fill in source, medium and campaign, and the tool adds the UTM tags so your analytics can tell which link brought each visitor — keeping any existing query string and #anchor intact.

Live demo · real result from this tool
Spaces in values

Tagged URL

https://example.com/autumn-sale?ref=nav&utm_source=newsletter&utm_medium=email&utm_campaign=autumn%20sale%202026&utm_content=hero-button#top

Values contain spaces; they are encoded as %20.

Parameters

ParameterValueEncoded
utm_sourcenewsletternewsletter
utm_mediumemailemail
utm_campaignautumn sale 2026autumn%20sale%202026
utm_contenthero-buttonhero-button

Processed on your device — nothing is uploaded.

How to use the UTM builder

  1. Paste the Destination URL — the page people should land on. If you leave out https://, it is added and you are told.
  2. Fill in Campaign source, Campaign medium and Campaign name.
  3. Optionally add Campaign ID, Campaign term and Campaign content.
  4. Leave Convert values to lower case ticked unless you have a reason not to, and choose how to handle Spaces in values.
  5. Copy the Tagged URL. The table below it shows each parameter, its value and the encoded form.

What it does and when to use it

UTM tags are extra query parameters that tell analytics tools where a visit came from. A link in your newsletter, an Instagram ad and a printed QR code can all point to the same page; with different utm_source and utm_medium values you can see which one actually brought visitors and sales.

Hand-editing goes wrong in small ways: a second ?, an & inside a campaign name that cuts it short, or tags placed after the #anchor. This builder handles those cases.

Tagged links are what make a marketing plan’s “results by channel” measurable. Use the tagged URLs in your ad copy and landing page tests so each version can be compared.

How it works

The tool reads your URL and accepts only http and https links. Each value is trimmed, lower-cased if you asked, has spaces swapped for - or _ if you asked, and is then percent-encoded with encodeURIComponent — so & becomes %26 and a space becomes %20. The tags are added in a fixed order: utm_source, utm_medium, utm_campaign, utm_id, utm_term, utm_content, after any existing parameters and before the #fragment. Empty optional fields are left out.

Worked examples

The default link. https://example.com/autumn-sale?ref=nav#top with source newsletter, medium email, campaign “autumn sale 2026” and content hero-button becomes:

https://example.com/autumn-sale?ref=nav&utm_source=newsletter&utm_medium=email&utm_campaign=autumn%20sale%202026&utm_content=hero-button#top

The ref=nav parameter is kept and #top stays at the end.

No scheme, capitals kept. shop.example.com/boots with source “Instagram”, medium “paid social”, campaign “Winter Boots” and lower case turned off gives https://shop.example.com/boots?utm_source=Instagram&utm_medium=paid%20social&utm_campaign=Winter%20Boots, with notices about the added https:// and the capitals.

Replacing an old tag. https://shop.example/?utm_source=old with source facebook, medium social, campaign launch becomes https://shop.example/?utm_source=facebook&utm_medium=social&utm_campaign=launch — one utm_source, not two.

Limits and tips

  • Agree a naming list with your team (for example: email, cpc, social) and stick to it.
  • The tool does not check that the page exists. Open the tagged link once before you send it.

Frequently asked questions

Which UTM fields do I really need?
Source, medium and campaign. Reports group visits by those three, so the tool warns when any of them is empty. Campaign ID, term and content are optional extras for finer detail, such as which of two buttons in an email was clicked.
Why convert values to lower case?
Analytics tools treat "Email" and "email" as two different sources, which splits your numbers. "Convert values to lower case" is on by default; if you turn it off and use capitals, the tool shows a reminder.
Should I use spaces, dashes or underscores?
Any of them works if you stay consistent. Spaces are encoded as %20, which is valid but harder to read in a link. Choosing "Use -" or "Use _" swaps spaces for that character before encoding.
What if my link already has a utm_source?
The new value replaces the old one instead of adding a second copy. Other query parameters, such as ?ref=nav, stay exactly as they were.
Can I tag internal links on my own site?
It is better not to, because in many analytics setups the tag can replace where the visitor really came from. Use UTM tags on links outside your site — emails, ads, social posts, QR codes.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close