Converters
UTM Builder
Build a campaign link with source, medium, and campaign, and add term or content when a report needs them. Other query parameters stay in place, ready to copy.
Add your campaign fields, then generate a tracked URL.
Tracked URL
—
Output actions
Ready to copy output once your result appears.
Five UTM fields on the URL you already have
UTM Builder reads Base URL and sets utm_source, utm_medium, and utm_campaign, which are required, plus utm_term and utm_content when those boxes are not blank. Existing query keys stay. A UTM key that is already on the URL is replaced. Spaces in a value become plus signs, and a hash is kept. The base field starts at https://toolbench.online/tools/slug-generator. Copy output copies the finished URL. There is no download.
How to build a tracked URL
- 1Edit Base URL if the prefilled slug-generator address is not the page you are tagging. The field must be an absolute URL.
- 2Fill UTM source, UTM medium, and UTM campaign. UTM term and UTM content are optional. The placeholders are newsletter, email, spring_launch, optional keyword, and optional creative.
- 3Press Generate tracked URL. Success says Tracked URL generated. A missing source, medium, or campaign says Source, medium, and campaign are required. and clears the result. A base that does not parse says Enter a valid base URL before generating. and clears the result.
What it is good for
- • Adding source, medium, and campaign to the prefilled tool URL in one click.
- • Keeping a query key that was already on the base, such as ref, while the UTM keys are set.
- • Leaving term and content off the URL when those boxes are empty.
Example
Input
Base URL https://toolbench.online/tools/slug-generator UTM source newsletter UTM medium email UTM campaign spring_launch Term and content left blank
Output
https://toolbench.online/tools/slug-generator?utm_source=newsletter&utm_medium=email&utm_campaign=spring_launch
The base is the value already in the field when the page opens. Term and content are omitted because they are empty, not because they are written as blank parameters.
What searchParams.set changes
Generate tracked URL constructs a URL from Base URL, then calls searchParams.set for each non-empty field. The keys are utm_source, utm_medium, utm_campaign, utm_term, and utm_content, in that order. set replaces a key that is already present and leaves every other key where it was. A base of https://example.com/?utm_source=old&x=1 with a new source therefore keeps x=1, replaces utm_source, and appends medium and campaign. The printed value is the URL's toString form.
Values are trimmed first. A term that is only spaces is treated as empty and is not set. A value with a space is encoded with a plus. A value with & is encoded as %26 so it does not open another parameter. A hash on the base stays after the query. A base that is only an origin, such as https://example.com, is printed with a slash before the question mark, because that is how the URL serializer writes an empty path. A base that already has a path does not gain a second slash.
The five campaign fields
Base URL is prefilled. The five UTM boxes start empty. Source, medium, and campaign must be non-empty after trim or the click stops before any URL is built. Term and content do not. The page does not lowercase the values, does not replace spaces with underscores, and does not offer a list of medium names. newsletter, email, and spring_launch are placeholders, not inserted text.
Generate tracked URL is the only button. Typing does not rebuild the result. The status starts as Add your campaign fields, then generate a tracked URL. Copy output copies the URL in Tracked URL. There is no Download output control. The share links in the shell share this tool's address, not the campaign URL you just built.
When a tagged link is the right paste
Use this page when the destination already exists and you only need the five standard parameters. It does not invent a path. A slug for that path can come from the slug generator, which is also the prefilled base. A title and a canonical for the destination page are the meta tag generator. This builder does not emit tags, and that generator does not set utm_ keys.
If you need to see the decoded parameters after the link is built, paste the result into the URL parser. A plus in a value becomes a space when that parser decodes it. If a single parameter value must be percent-encoded before you drop it into some other string, that is URL encode / decode. This page already encodes the UTM values as part of building the URL.
Spaces, fragments, and keys that already exist
A source of news letter is utm_source=news+letter. A campaign of a&b is utm_campaign=a%26b. The fragment #top stays at the end. Parameters that were on the base and are not one of the five UTM keys stay, in their previous order, and the UTM keys that were set are written as searchParams.set writes them. Setting a key that already exists does not duplicate it.
There is no utm_id field and no field for an arbitrary extra key. If you need another parameter, put it on the base URL before you generate. An empty required field clears Tracked URL and says Source, medium, and campaign are required. A base that fails the URL parser, including a host with no scheme, clears Tracked URL and says Enter a valid base URL before generating. The page does not request the URL and does not check that the host answers.
Rules and limitations
Source, medium, and campaign are required and trimmed. Term and content are set only when they are non-empty after trim. Existing non-UTM query keys stay. An existing UTM key is replaced. Spaces become plus signs. The fragment is kept.
A bare origin is serialized with a slash before the query. A bad base or a missing required field clears the result. Copy output copies the URL. There is no download and no utm_id field.
Common problems
If a space became a plus, that is the query serializer. The page will not write %20 for that space, and it will not turn the space into an underscore.
If an old utm_source disappeared, set replaced it. Other keys on the base remain. If the whole result cleared, a required field was blank or the base did not parse.
Frequently asked questions
Which fields can I leave blank?
UTM term and UTM content. They are omitted rather than sent as empty parameters. Source, medium, and campaign must contain something other than spaces.
What happens to a query string that is already on the base?
Keys other than the five UTM names stay. If the base already has utm_source, the new source replaces it. The same replacement applies to medium, campaign, term, and content when you set them.
Does a hash survive?
Yes. The fragment stays on the end of the printed URL. It is not turned into a query parameter.
Is the campaign URL downloaded?
No. Copy output copies Tracked URL. There is no download button.
Is my input uploaded or saved?
This tool processes input in your browser and does not save its input or output to local storage. Copy and download are user actions. The site uses analytics for page and action metadata and may use ads and production error reporting; see the Privacy Policy for those services.
About this tool
Maintained by Toolbench. For large or deeply nested files, split the input into smaller batches and verify representative results before using them in an import or application. Report reproducible problems through Contact.
Next steps
Related tools
Continue the workflow with nearby tools for formatting, publishing, debugging, or follow-up checks.
Meta Tag Generator
Generate title, meta description, canonical, Open Graph, and Twitter tags.
Open Meta Tag GeneratorSlug Generator
Create a lowercase hyphenated slug from a title.
Open Slug GeneratorURL and Query String Parser
Split a URL or query string into components and decoded parameters.
Open URL and Query String ParserURL Encode / Decode
Percent-encode or decode text with encodeURIComponent.
Open URL Encode / DecodeTrust
Policies, contact, and answers
Clear pages for how Toolbench works, what we collect, and how to reach us.