Code · Made a little simpler

Canonical Tag Generator

Generate a canonical declaration. Choose which parts of the URL to normalize, review the changes and copy an HTML link element or HTTP Link field.

Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
URL settings

The generator removes fragments. Choose the other changes that match your preferred URL.

Add this tool to your website

Paste this code into your page to add the tool and a visible ToolMellow credit link.

HTML embed code
Preview embed

Canonical Tag Generator: how to use it

  1. Enter an absolute page URL or load the example.
  2. Choose any scheme, hostname, path or query changes that match your preferred address. Select Generate canonical.
  3. Review the preferred URL and the list of changes. Copy or download the HTML link element or the HTTP Link field.

Limits and notes

Accepts an absolute HTTP(S) URL up to 2,048 characters without credentials. Fragments are removed. It handles one URL at a time and builds a declaration on your device. The result reflects your chosen URL settings.

How your privacy works →

Canonical Tag Generator: common questions

Which URL should I make canonical?

Choose the preferred URL for pages with duplicate or substantially similar content. Keep the declaration consistent with your sitemap and internal links.

Can I remove common campaign parameters while keeping product or language options?

Choose Remove campaign parameters to remove utm_ names and known click IDs while keeping other query fields. Check that each remaining field has the intended meaning for your site.

Where do I add a canonical for a PDF file?

Use the HTTP Link field in the PDF response. For an HTML page, choose the HTML link element and place it in the head.

Guides