Skip to content
Plaintools

UTM generator

Paste a destination URL and the campaign fields you actually use. The encoded link updates live. We reject javascript:, data:, and anything that is not http or https so you do not ship a broken or dangerous href.

Optional. Often used for paid keywords.

Optional. Distinguishes two links in the same campaign.

UTM generator example

Spring newsletter click-through

https://example.com/sale plus source=newsletter, medium=email, campaign=spring-sale, content=header-button. The result is a single encoded URL you can drop into an email.

UTM generator how-to

  1. Trim the destination. Parse with `new URL(raw)`. On failure: not a valid URL; include a scheme.
  2. Reject protocols javascript:, data:, vbscript:, file:. Only http: and https: are allowed, and hostname must be non-empty.
  3. Trim source, medium, and campaign. If any is empty, stop: those three are required.
  4. Call searchParams.set for utm_source, utm_medium, utm_campaign.
  5. If term is non-empty after trim, set utm_term; else delete utm_term. Same for content → utm_content.
  6. Return parsed.toString(). Do not double-encode an already-encoded URL.

Related tools

SEO

Slug generator

Turn a title into a lowercase URL slug, with stop words stripped and unicode transliterated.

SEO

JSON-LD generator

Build live JSON-LD for FAQ, HowTo, Article, Product, LocalBusiness, Breadcrumb, and Organization.

SEO

Open Graph generator

Generate Open Graph and Twitter Card meta tags with live social preview cards.

SEO

Hreflang generator

Generate HTML link tags, XML sitemap snippets, and HTTP headers for multilingual and multi-regional hreflang SEO.

People also use

SEO

Favicon generator

Convert any image into PNG favicons (16×16, 32×32, 48×48), favicon.ico, and Apple touch icons.

SEO

Robots.txt generator

Generate RFC 9309 robots.txt files with allow/disallow paths, bot groups, sitemaps, and crawl delays.

SEO

Schema checker

Validate Schema.org JSON-LD syntax, @context, @type, and required fields for FAQ, HowTo, Article, and Product.

SEO

Meta tag generator

Generate HTML title, meta description, canonical, robots, viewport, and theme-color tags with live Google SERP preview. Nothing is uploaded.

UTM generator FAQ

Is this the same as Google’s Campaign URL Builder?
Same job, different place. Google’s builder needs their site and session. This page builds the tagged URL in your tab with the URL API — no Google account, no upload, and the destination never leaves the device. Paste the result into ads, email, or social yourself; this tool does not create the campaign in Analytics.
Is my URL uploaded?
No. The tagged link is assembled with the URL API in this tab. There is no upload and no request that includes your destination. The destination never leaves the device.
What is a UTM generator?
A UTM generator builds a campaign URL by appending utm_source, utm_medium, utm_campaign, and optional term and content parameters so analytics can attribute the click. This one does that in the page as you type.
Which UTM fields are required?
A valid http(s) URL plus source, medium, and campaign. Term and content are optional. That matches the usual analytics contract: the first three identify the campaign, the last two refine it.
Why was my URL rejected?
The field must parse as a URL, use http or https, and include a hostname. We also block javascript: and data: schemes. If you pasted a path like /pricing, add the origin first.
Are values encoded?
Yes. Spaces and reserved characters are encoded with the URL API so the link survives email clients and redirects. Do not double-encode an already-encoded URL.
Does this create the campaign in analytics?
No. It only writes query parameters. Your analytics property still has to collect page views with those parameters.
How do I add the same UTM parameters without this page?
Parse the destination with the URL constructor. Reject javascript:, data:, vbscript:, and file:, and anything that is not http(s) with a hostname. Require trimmed source, medium, and campaign. searchParams.set utm_source, utm_medium, and utm_campaign. If term/content are non-empty, set utm_term/utm_content; otherwise delete those keys. Return URL.toString() (the URL API encodes). Relative paths like /pricing need an origin first.