Skip to content

Canonical Tag Generator

Generate a valid rel="canonical" link tag from any absolute URL, with optional removal of UTM and other tracking parameters. Copy or download.

Web & SEO Runs client-side Free to use
Jump to the tool
Share: X WhatsApp
Loading Canonical Tag Generator…

About the Canonical Tag Generator

Canonical Tag Generator turns a page address into a clean canonical URL and a ready-to-paste <link rel="canonical"> tag. It checks that the address is an absolute http:// or https:// URL, removes the #fragment, and can strip common tracking parameters such as utm_source, utm_medium, utm_campaign, utm_term and utm_content.

Meaningful query parameters — for example a product variant or page number — are kept exactly as you typed them unless you explicitly choose to remove all parameters. The tool only builds markup from the text you enter; it does not visit, crawl or check any website.

How to use

  1. Paste the preferred address of the page into Page URL, including https://.
  2. Leave “Remove common tracking parameters” ticked to strip UTM tags and click IDs, or untick it to keep them.
  3. Tick “Remove all query parameters” only if no parameter changes the page content.
  4. Check the canonical URL, the generated HTML tag and the notes listing anything removed.
  5. Click Copy URL, Copy Tag or Download .html, then paste the tag inside the page’s <head>.

Key features

  • Validation for absolute http/https URLs with clear error messages.
  • Optional removal of utm_* parameters and gclid, fbclid and msclkid click IDs.
  • Always removes #fragments, which are never sent to servers.
  • Keeps other parameters with their original encoding.
  • Correctly escaped HTML attribute value in the generated tag.
  • Copy URL, Copy Tag and a downloadable .html snippet.

Best practices

  • Point every duplicate or parameter variant of a page to one preferred URL.
  • Use absolute URLs with your preferred protocol and host (for example https://www.).
  • Make the canonical URL consistent with your internal links, sitemap and redirects.
  • Use a self-referencing canonical on the preferred page itself.
  • Don’t canonicalise paginated or filtered pages to a page with different content.

Benefits

  • Avoids typos and unescaped characters in hand-written canonical tags.
  • Strips campaign tracking that should never be part of a canonical URL.
  • Works without access to the live site — handy for templates and staging.
  • Private: nothing you type leaves the browser.

Frequently asked questions

What is a canonical tag?

It is a <link rel="canonical" href="…"> element in a page’s <head> that tells search engines which URL you prefer when the same or very similar content is available at several addresses.

Does a canonical tag guarantee indexing?

No. It is a strong hint, not a command. Search engines can choose a different canonical URL, and a canonical tag does not make a page get indexed.

Why is the #fragment removed?

Fragments are handled by the browser and never sent to the server, so they should not be part of a canonical URL.

Which tracking parameters are removed?

When the option is on: utm_source, utm_medium, utm_campaign, utm_term, utm_content, utm_id, gclid, fbclid and msclkid. Other parameters are kept unless you tick “Remove all query parameters”.

Does this tool check my website?

No. It does not fetch, crawl or validate any live page. It only transforms the URL you type into markup.

Where do I put the tag?

Inside the <head> of the page it describes. Use only one canonical tag per page.