Canonical URL Generator

Generate a canonical link tag with configurable URL normalization. Review retained parameters, host and slash choices, then install and verify the declaration.

Canonical URL Generator

Normalize an HTTP or HTTPS URL, strip tracking params, get the canonical HTML tag.

Paste an absolute HTTP or HTTPS URL. Review host, slash and meaningful parameters; the tool does not fetch the page.

Normalization

Separate exact names with commas or spaces; matching ignores case. Keep names required for the page, including ref if it changes content.

Canonical URL
Enter a URL above…
HTML
Generated tag appears here…
Validation
0 0
  • Paste an absolute HTTP or HTTPS URL to see its canonical form.
Steps

How to use

  1. Enter an absolute HTTP or HTTPS URL, or load the built-in example.
  2. Review the normalization settings and keep parameters required by the page.
  3. Copy the HTML tag, install it through your site settings or HTML head, then verify the live declaration.
Examples and use cases
  • The built-in example becomes https://www.example.com/Blog/Post?id=42 with default settings; path casing and content parameters stay, while the final path slash is removed.
Privacy, limits and tool details
Tips

Pro tips

  • Choose the preferred URL from actual routing and content; a shorter URL is not automatically correct.
  • Review exact parameter names in the drop list and align canonical declarations with internal links and sitemap entries.
Detailed Canonical URL Generator guide

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 &amp; in the href attribute. The generated HTML snippet escapes attribute characters, including query separators as &amp;; 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.

Sources

Frequently asked questions

No. It transforms the supplied URL using your settings and generates a tag. It does not fetch pages, compare content or determine which URL Google selects.

No. The default list removes utm_source, utm_medium, utm_campaign, utm_term, utm_content, gclid, fbclid and ref by exact name, ignoring case. Add other names explicitly and retain parameters required for the content.

Yes. When enabled, it removes one final slash from a non-root path even when a query string or fragment remains. The root slash is retained. Use this setting only when the resulting path matches your site routing.

Only when those changes match the preferred page on your site. Query parameters can select different content, and changing the host can point to a different or unavailable destination. The generator does not test either choice.

Copy places the generated link tag on the clipboard. Download HTML exports the snippet as canonical.html. Neither action installs it. The tag escapes HTML attribute characters. Use the displayed URL for a CMS URL field or the tag for an HTML field, then verify the installed declaration.

No. It communicates a preferred URL among duplicate or very similar pages. It does not redirect visitors or force Google to select that URL. Check the deployed declaration and Search Console reporting.

This tool requires an absolute URL with a scheme. Use an HTTP or HTTPS web-page address. Successful browser parsing alone does not prove that an address is suitable as a canonical target.
7 min read