Canonical URL Generator
Generate a clean canonical URL and a ready-to-paste tag. Paste any messy URL and normalize it in your browser: force HTTPS, force or strip www, lowercase the host, remove tracking parameters (utm_*, gclid, fbclid and more), sort or drop query parameters, strip the trailing slash, remove index.html, and drop the #fragment — then copy both the canonical URL and the HTML tag.
The Canonical URL Generator turns a messy, parameter-laden URL into a single clean canonical address and the matching tag you can paste straight into your
. Paste any URL and it normalizes it the way search engines prefer: forcing HTTPS, stripping or forcing the www prefix, lowercasing the host, removing tracking parameters like utm_source and gclid, sorting or dropping query parameters, removing the trailing slash and index.html, and dropping the #fragment. You get back both the cleaned URL and the ready-to-use HTML tag. Everything runs in your browser — nothing is uploaded.What is a canonical URL?
A canonical URL is the single, preferred address you want search engines to index for a piece of content when the same page can be reached through several different URLs. Tracking parameters, www vs. non-www, http vs. https, trailing slashes and index.html all create duplicate URLs that point at the same page. The canonical URL — declared with a tag — tells Google and other crawlers which version is the real one, so ranking signals are consolidated onto a single address instead of being split across duplicates.
How to generate a canonical URL
Paste the URL and choose how you want it normalized.
- Paste the full URL — including any query string or fragment — into the input box.
- Pick your protocol and www preference, then toggle the cleanup options (tracking removal, query sorting, trailing slash, index file, fragment).
- Copy the cleaned Canonical URL, or copy the ready tag and paste it into the of the page it describes.
What does URL canonicalization remove?
Canonicalization rewrites a URL to a single normal form so duplicates collapse into one address.
- Tracking parameters such as utm_source, utm_medium, utm_campaign, gclid, fbclid and msclkid that don't change the page content.
- The www prefix (or the lack of it), so www.example.com and example.com don't compete as two pages.
- An http:// scheme upgraded to https:// when you want the secure version to be canonical.
- A trailing slash and a default document name like index.html or index.php that resolve to the same directory.
- The #fragment, which never reaches the server and should not create a separate indexed URL.
- Optionally, the query string is dropped entirely or its parameters are sorted alphabetically for a stable, comparable order.
Where to put the canonical tag
Place the generated inside the
of every page that should point at this canonical address — including the duplicate variants. The href must be an absolute URL (this tool always outputs one). A page can also be self-referential: it's good practice for the canonical version to include a canonical tag pointing at itself. If you publish across languages, pair canonical tags with hreflang annotations rather than using canonical to point between translations.Why use this canonical URL generator?
- Outputs both the clean canonical URL and the ready-to-paste tag, with the href safely HTML-escaped.
- Removes 40+ common tracking parameters (all utm_*, gclid, fbclid, msclkid, mc_cid and more) in one click.
- Handles www vs. non-www, http vs. https, trailing slashes, index.html and #fragments consistently.
- Sorts query parameters so the same logical URL always normalizes to the same canonical string.
- Every option is a toggle, so you control exactly which normalization rules apply.
- Runs entirely in your browser — the URL you paste is never uploaded, logged, or stored.
Frequently asked questions
What's the difference between this and a meta tag generator?
A meta tag generator simply wraps whatever URL you type into a tag without changing it. This tool actually canonicalizes the URL first — forcing HTTPS, normalizing www, stripping tracking parameters, removing trailing slashes and index.html, sorting query parameters and dropping the fragment — so the address inside the tag is already the clean, deduplicated version. You get both the normalized URL and the tag.
Should I remove UTM and other tracking parameters from canonical URLs?
Yes. Tracking parameters like utm_source, gclid and fbclid don't change the page's content, so leaving them in a canonical URL would point search engines at a duplicate variant. The canonical tag should reference the clean URL without campaign parameters, which is why removing tracking parameters is on by default here.
Should the canonical URL use www or non-www, http or https?
Pick one and be consistent across your whole site. Most sites canonicalize to HTTPS and to either www or non-www — it doesn't matter which, as long as every page agrees. This tool lets you force HTTPS and force or strip www so all your canonical URLs follow the same convention.
Does removing the trailing slash or index.html affect SEO?
Those variations (example.com/page, example.com/page/ and example.com/page/index.html) often resolve to the same content, creating duplicate URLs. Choosing one canonical form and declaring it consistently consolidates ranking signals onto a single URL. Make sure your server actually serves the page at the canonical form you choose.
Is the canonical URL generator free and private?
Yes. It is completely free and runs entirely in your browser with JavaScript. The URL you paste is normalized locally on your device and is never uploaded, logged, or stored.