Use the Canonical URL Generator to draft a preferred URL and its HTML link tag. It applies the settings you choose in your browser. It does not fetch the page, compare duplicate content, test redirects or determine Google's selected canonical.
Generate a canonical tag from the built-in example
Select Load example to populate this fictional URL and restore the default settings:
HTTP://Www.Example.COM/Blog/Post/?utm_source=twitter&id=42&#top
The output is:
https://www.example.com/Blog/Post?id=42
The HTML output is:
<link rel="canonical" href="https://www.example.com/Blog/Post?id=42" />
HTTP changes to HTTPS, the host becomes lowercase, the listed UTM parameter is removed and the fragment disappears. The path keeps its capitalization, www. remains, and id=42 is retained. Strip trailing slash removes the final non-root path slash even when a query string or fragment remains.
This is a demonstration of URL transformations, not a recommendation to use that address. Before installing a tag, confirm that the resulting host, path and parameters identify the intended page on your site.
Review each normalization setting
A shorter URL is not automatically the correct canonical. Choose settings that match your site's routing and content.
| Setting | Default | What this tool does |
|---|---|---|
| Force HTTPS | On | Changes an HTTP scheme to HTTPS; it does not check that HTTPS works. |
| Strip www. | Off | Removes the leading www. when enabled; it does not check the alternate host. |
| Strip trailing slash | On | Removes one final slash from a non-root path, including when a query string or fragment remains. The root / is retained. |
| Strip all query params | Off | Removes the whole query string when enabled, including parameters that select content. |
| Strip #fragment | On | Removes the fragment, such as #top. |
| Lowercase host | On | Requests lowercase host spelling; browser URL parsing already normalizes ordinary HTTP/HTTPS host names. It does not lowercase the path. |
| Sort remaining params | On | Sorts retained query entries by parameter name and serializes them again. It does not remove repeated entries. |
Use a full HTTP or HTTPS address, including the scheme. A relative path such as /pricing or a bare domain such as example.com does not parse here. Other schemes, including mailto:, ftp:, file: and data:, are rejected. Invalid input clears the generated URL and tag and disables Copy and Download HTML. Successful parsing does not prove that the URL is the appropriate canonical page. Remove credentials or sensitive values before entering a URL.
Decide which query parameters to retain
The default Drop query parameters list is:
utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, fbclid, ref
Matching is case-insensitive and uses exact names. The list does not mean every utm_* parameter: utm_id, msclkid and other names remain unless you add them. Separate names with commas or whitespace. An empty drop list retains query entries unless Strip all query params is enabled. Retained query values may be re-encoded during serialization, so compare the full output with the intended address.
Decide from the page's behavior whether a parameter can be removed. A campaign label may leave the main content unchanged; an id, language, filter or pagination parameter may select different content. Even ref, which is in the default list, requires review on your site. If a listed name is necessary, remove it from the drop list. Turning on Strip all query params overrides that list and removes every query parameter.
The UTM Builder creates campaign links for sharing. Those links and a page's preferred canonical serve different purposes: you can retain campaign tags on inbound links while declaring an equivalent preferred page without those tags.
Install the declaration and verify the page
Copy copies the generated HTML tag. Download HTML exports the snippet as canonical.html; downloading it does not add a canonical to your site. Reset clears the URL and restores the initial settings. Neither output requires a tool account, and URL transformation runs locally in the browser.
Install the declaration through your CMS or framework's canonical setting, or place the link element in the page's HTML head. If the canonical contains multiple query parameters, use the CMS's URL field or HTML-aware serializer. For hand-written HTML, escape query separators as & in the href attribute. The generated HTML snippet escapes attribute characters, including query separators as &; the displayed canonical URL remains a URL, not HTML. Copy the URL into a CMS URL field or the tag into an HTML field, as appropriate.
Inspect the resulting page source for the intended declaration and remove conflicting canonical tags. Open the preferred URL and check that it returns the expected content without an unintended redirect, error or indexing restriction. The Meta Tags Analyzer can help review declarations, while the Redirect Checker can help inspect a URL's redirect behavior.
The validation panel is a local parsing check. Its success message does not verify the live page, valid HTML installation or Google acceptance. The tool also shows a warning above 2,048 characters; treat that as a review prompt rather than a universal crawler limit.
Understand canonical signals and choose the right fix
A canonical declaration communicates a preference among duplicate or very similar pages. It does not redirect visitors, remove URLs or guarantee Google's choice. Avoid using a site's homepage as the canonical for unrelated pages.
For equivalent pages that must remain available, declare the preferred URL, including a self-referencing declaration on that preferred page. Keep sitemap entries and internal links consistent with it. Google recommends absolute URLs and placing HTML canonical declarations in the head; fragments should not be canonical targets. Use a permanent redirect when retiring a duplicate URL. Do not use noindex or robots.txt as substitutes for canonical selection.
After deployment, use Search Console URL Inspection to compare the user-declared and Google-selected canonical where the report provides them. If they differ, inspect content similarity and conflicting technical signals rather than assuming that changing the tag forces a new selection.
For broader decisions, read the duplicate content SEO guide. Once you have chosen the preferred addresses, the XML Sitemap Generator can help format a sitemap from that reviewed list.