Canonical URL Generator

New

Strip tracking parameters, force HTTPS, drop fragments, sort params and get the canonical HTML tag ready to paste.

Last updated June 2025 3 min read Works in browser Privacy first

Canonical URL Generator

Normalize any URL, strip tracking params, get the canonical HTML tag.

Normalization

Canonical URL
Enter a URL above…
HTML
Generated tag appears here…
Validation
0 0
  • Paste any URL to see its canonical form.
Guide

What a canonical URL is

A canonical URL is the single "official" version of a page when the same content can be reached from multiple URLs. It is expressed as:

<link rel="canonical" href="https://example.com/pricing" />

inside the <head> of the page. Search engines consolidate ranking signals (backlinks, click data, indexation) onto that URL and treat the rest as duplicates.

How this tool works

Paste any URL. We normalize it (HTTPS, host casing, tracking params, sorting), and emit the canonical tag you can paste directly.

Why you need canonicals — even on unique pages

Even if you think every page has a single URL, in reality:

  • Marketing appends ?utm_source=… and creates a new URL for every campaign.
  • Analytics scripts add ?fbclid=… or ?gclid=… on click.
  • CDNs and A/B testing tools inject query params.
  • Servers respond to both example.com/page and example.com/page/.
  • HTTPS migrations leave http:// versions crawlable.

Every variant risks a small share of your ranking signals. A self-referencing canonical fuses them back together.

The seven rules Meta Tag Studio applies

Rule Effect
Force HTTPS Upgrades http:// to https://.
Strip www. Removes www. from the host. Turn on only if your site does not use it.
Strip trailing slash Removes trailing / (keeps root /). Match your site's actual pattern.
Strip all query params Aggressive. Use for pages that never take real params.
Strip fragment Removes #section. Almost always safe.
Lowercase host Example.COMexample.com. Always safe.
Sort remaining params Deterministic ordering avoids duplicates like ?a=1&b=2 vs ?b=2&a=1.

Params to always drop

Unless a page genuinely reads them, drop:

utm_source, utm_medium, utm_campaign, utm_term, utm_content,
gclid, fbclid, msclkid, twclid, ref, mc_cid, mc_eid, ttclid

They are attribution parameters — they never point at different content.

Common mistakes

  1. Canonical → different content. If page A's canonical is B, they must be genuinely the same content. Otherwise Google ignores the tag.
  2. Relative canonicals. Always absolute: https://example.com/pricing, not /pricing.
  3. Multiple canonicals per page. Only the first is honored — remove duplicates.
  4. Canonical pointing to a noindex page. Google will treat both as noindex.
  5. Trailing-slash mismatch. If your site canonicalizes to example.com/page/, do not emit example.com/page.

After you copy the tag

  1. Paste it inside the <head> of the page.
  2. In Next.js / Astro / SvelteKit, set it via the built-in metadata or <svelte:head>.
  3. Verify with the URL Inspection Tool — the "User-declared canonical" should match.
Self-referencing is the safe default

Even on the URL you consider the canonical, add a canonical tag pointing at itself. It signals intent, guards against future URL variants, and costs nothing.

FAQ

Does Google always honor the canonical? It is a strong hint. Google may still pick a different URL if signals conflict — but the great majority of the time, a clean canonical is followed.

Should the canonical include the trailing slash? Match your site's real routing. Pick one and be consistent.

Do canonicals help for cross-domain duplicates? Yes — a canonical pointing to a URL on a different domain is respected.

Steps

How to use

  1. Paste any URL.
  2. Toggle normalization rules (HTTPS, strip www, drop tracking params).
  3. Copy the generated <link rel="canonical"> tag.
Why you’ll love it

Benefits

Free forever

No trials, no paywalls, no ads inside the tool.

Zero friction

No sign up, no email, no cookies you didn’t ask for.

Fast by design

Interactions render in under 200ms on modern devices.

In practice

Examples

  • ?utm_source=twitter&fbclid=… → clean canonical without tracking noise.
Tips

Pro tips

  • Set canonical on every page, even self-referencing ones — it protects you from future duplicates.
  • Drop marketing params by default (utm_*, gclid, fbclid, ref).
Watch out

Common mistakes to avoid

  • Skipping validation before copying the output.
  • Not double-checking the input for hidden characters (leading spaces, invisible unicode).
  • Sharing sensitive data through URLs — use the copy button instead.

Frequently asked questions

Made with care by ToolMint