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.

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.

Related: Schema markup generator, Slug generator, JSON-LD generator, Open Graph generator, Hreflang generator

FAQ

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.