Utilix
SEO & marketing·Tracking Utility

UTM Link Builder

Build properly encoded UTM tracking URLs for Google Analytics. Add utm_source, utm_medium, utm_campaign and optional term, content, and id parameters in seconds.

Input

Lowercase parameter values
Replace spaces with underscores

Result

Enter a value for destination url to see your result.

How it works

Builds a properly URL-encoded campaign tracking link by appending Google Analytics UTM parameters (utm_source, utm_medium, utm_campaign, plus optional term/content/id) to any destination URL.

Formula

tagged_url = base_url + (already_has_query ? '&' : '?') + URLSearchParams(utm_*)

base_url
Destination URL the user visits
utm_*
Standard tracking parameters consumed by GA4 and most analytics tools

Step by step

  1. 01Validate that the destination URL has a protocol (http or https) and a hostname.
  2. 02Normalise each value: trim whitespace, optionally lowercase, optionally replace spaces with underscores.
  3. 03Reject any UTM value containing characters that would break a URL until they are percent-encoded.
  4. 04Append the parameters with proper encoding via URLSearchParams, preserving any pre-existing query string and hash.
  5. 05Warn when required parameters are missing or when the source/medium/campaign trio is incomplete.

Examples

Newsletter campaign with required UTM trio

All three required UTM parameters present, no existing query string on the destination, no optional fields used.

Inputs

Destination URL:
https://example.com/landing
utm_source — referrer (required):
newsletter
utm_medium — channel (required):
email
utm_campaign — name (required):
spring_sale_2026
utm_term — paid keyword (optional):
utm_content — variant (optional):
utm_id — GA4 campaign ID (optional):
Lowercase parameter values:
true
Replace spaces with underscores:
true

Result

Tagged URL:
https://example.com/landing?utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026
Just the query string:
utm_source=newsletter&utm_medium=email&utm_campaign=spring_sale_2026

Existing query string preserved + content variant

Spaces become underscores, values get lower-cased, the existing ref=blog query is preserved and the #anchor stays at the end of the URL.

Inputs

Destination URL:
https://example.com/page?ref=blog#anchor
utm_source — referrer (required):
Twitter
utm_medium — channel (required):
Social
utm_campaign — name (required):
Launch Day
utm_term — paid keyword (optional):
utm_content — variant (optional):
Hero CTA
utm_id — GA4 campaign ID (optional):
Lowercase parameter values:
true
Replace spaces with underscores:
true

Result

Tagged URL:
https://example.com/page?ref=blog&utm_source=twitter&utm_medium=social&utm_campaign=launch_day&utm_content=hero_cta#anchor
Note: Use lowercase, underscore-separated values consistently — `email`, `Email`, and `EMAIL` are different campaigns in GA4. utm_id (GA4 campaign ID) lets you join offline campaign metadata; safe to leave blank for most use cases.

Frequently asked questions

Which UTM parameters are required?

utm_source, utm_medium, and utm_campaign are required by Google Analytics for a campaign to register correctly. utm_term, utm_content, and utm_id are optional and used for paid keywords, A/B variants, and joining offline campaign metadata.

Should I use uppercase or lowercase UTM values?

Use lowercase consistently. UTM values are case-sensitive in GA4 — `Email` and `email` would show up as separate sources. The 'Lowercase' switch in this tool helps enforce that.

Will UTM parameters break my URL or affect SEO?

No. UTM parameters are query string parameters and do not affect a page's content. To avoid duplicate-content concerns from search engines, set rel=canonical on the destination URL pointing to the un-tagged version.