Skip to content
Case Converter Online
en

UTM Generator

Fill in the campaign fields and get a tagged link that analytics tools can read. Values are cleaned and encoded for you, and any existing query string is kept.

Who sends the visit: newsletter, google, facebook, partner-site.

The type of channel: email, cpc, social, paid_social, referral, display.

The promotion or reason: spring_sale, launch_2026, webinar_oct.

Optional. An ID from your ad platform or planning sheet.

Optional. Paid search keyword, such as running+shoes.

Optional. Tells apart ads or links that share a campaign: header_link, blue_banner.

    What UTM tags are for

    When someone lands on your site, analytics can usually tell which website sent them. It often cannot tell which email, which ad or which post they clicked. UTM tags fill that gap. They are extra parameters on the end of a link, for example:

    https://example.com/spring-collection?utm_source=newsletter&utm_medium=email&utm_campaign=spring%20sale%202026

    Google Analytics, Matomo, Plausible and most other tools read these tags and group visits by them. The name comes from Urchin, the analytics product Google bought and turned into Google Analytics.

    How to use the UTM generator

    1. Paste the page address into Website URL. If you leave out https://, it is added for you.
    2. Fill in Campaign source, Campaign medium and Campaign name. These three are marked as required. Suggestions appear as you type in the source and medium boxes.
    3. Add Campaign ID, Campaign term or Campaign content if you need them.
    4. Copy the finished link from Campaign URL.

    Two settings control how values are written:

    • Spaces in values: keep spaces as %20, write them as +, or replace them with _ or -.
    • Lowercase values: on by default, so Newsletter and newsletter do not end up as two rows in your reports.

    Below the link, the tool lists each tag with the cleaned value, and warns you if a required field is empty.

    The six fields

    Field Parameter What it records Example value
    Campaign source utm_source Who sends the visit newsletter, google, facebook
    Campaign medium utm_medium The type of channel email, cpc, paid_social
    Campaign name utm_campaign The promotion or reason spring_sale_2026
    Campaign ID utm_id An ID from your ad platform or plan abc123
    Campaign term utm_term The paid search keyword running shoes
    Campaign content utm_content Which ad or link inside a campaign blue_banner

    Examples

    These links come from running the generator.

    Input Result
    Campaign “Spring Sale 2026”, spaces as %20 ...&utm_campaign=spring%20sale%202026
    Same, spaces replaced with _ ...&utm_campaign=spring_sale_2026
    Same, spaces as + ...&utm_campaign=spring+sale+2026
    Lowercase values off utm_source=Newsletter&utm_medium=Email
    Campaign “Q4 & more” utm_campaign=q4%20%26%20more

    Existing parameters and fragments are kept. The address example.com/shop?ref=home#reviews with source facebook, medium paid_social, campaign black_friday and content blue_banner becomes:

    https://example.com/shop?ref=home&utm_source=facebook&utm_medium=paid_social&utm_campaign=black_friday&utm_content=blue_banner#reviews

    How it works

    The generator reads your address and splits it into three parts: the page, the query string and the fragment after #. It drops any old utm_ parameters from the query string and keeps the rest.

    Each value is trimmed, repeated spaces are reduced to one, and the case and space options are applied. Then each value is encoded with the same rules as JavaScript’s encodeURIComponent, so characters such as &, # and ? cannot break the link. An & in a campaign name becomes %26, for example.

    The tags go in a fixed order: source, medium, campaign, ID, term, content. The fragment goes back on the end, because anything after # is never sent to the server.

    Naming tips

    • Agree on a short list of mediums. Google Analytics 4 sorts traffic into default channel groups by medium, so values like email, cpc, social, paid_social, referral and display fall into the right group. A made-up medium such as blast ends up as “Unassigned”.
    • Use one separator. Pick underscores or hyphens for multi-word names and stick to it.
    • Keep it lowercase. The default setting does this for you.
    • Write names people will understand later. spring_sale_2026 is clearer than ss26v2.
    • Keep a sheet of the links you make. It saves guessing next quarter.
    • Do not put personal data in tags. Email addresses or names in a URL can end up in logs and reports.

    Other ways to add UTM tags

    Most email and ad platforms can add UTM tags automatically. In a spreadsheet, you can build links with a formula that joins the cells, such as =A2&"?utm_source="&B2&"&utm_medium="&C2, but you must encode spaces and symbols yourself, for example with ENCODEURL in Excel.

    In JavaScript, the URL object can set parameters:

    const u = new URL('https://example.com/spring-collection');
    u.searchParams.set('utm_source', 'newsletter');
    u.searchParams.set('utm_campaign', 'Spring Sale 2026');

    That gives ...?utm_source=newsletter&utm_campaign=Spring+Sale+2026. Note that searchParams writes spaces as + and does not lowercase anything.

    To check or fix encoding in a link by hand, use the URL encoder and decoder. To turn a campaign title into a clean value, try the slug generator. For print, put the tagged link in a QR code and use a medium such as qr so scans show up separately.

    UTM Generator: questions and answers

    What are UTM parameters?

    UTM parameters are tags added to the end of a link, such as utm_source=newsletter. When someone clicks the link, analytics tools like Google Analytics read the tags and record where the visit came from, which channel it used and which campaign it belongs to.

    Which UTM fields are required?

    Source, medium and campaign name are the three you should always fill in. Google Analytics 4 can work with fewer, but reports are much easier to read when all three are present. Term, content and ID are optional.

    Are UTM values case sensitive?

    Yes. Analytics tools treat Email and email as two different mediums, which splits your reports. Keep Lowercase values switched on so every link uses the same case.

    Should I use UTM tags on links inside my own website?

    No. Tagging internal links starts a new session with the internal tag as the source, which hides where the visitor really came from. Use UTM tags only on links that point to your site from somewhere else, such as emails, ads and social posts.

    What happens to a link that already has UTM tags?

    The generator removes the old utm_ parameters and adds the new ones. Other parameters and any #section at the end of the link are kept as they were.

    More code and data tools

    See all tools