Skip to content
T
Tools.Town
Free Online Tools for Everyone
Developer Corner

Canonical Tag Generator

Introducing the Canonical Tag Generator — Fix Duplicate URLs in Seconds

Generate a valid rel=canonical tag for any URL: force HTTPS, strip tracking parameters, and normalise the trailing slash. Free, instant, and client-side.

Tools.Town Team 23 June 2026 3 min read

The same page reached through http, https, www, a trailing slash, and a ?utm_source= tag is five URLs to a search engine — and five places your ranking signals get split. The new Canonical Tag Generator builds the one line of markup that ties them all back together.

What it does

  • Valid markup, every time: copy a correct HTML5 or self-closing XHTML <link rel="canonical"> tag.
  • Smart normalisation: force HTTPS, lowercase the domain, optionally drop www.
  • Cleans tracking URLs: strips UTM and other query parameters that fragment ranking signals.
  • Trailing-slash control: keep, add, or remove — so /page and /page/ stop competing.
  • HTTP header output: for PDFs and other non-HTML files that have no <head>.

Why it matters

A canonical tag consolidates duplicate URLs onto one authoritative version, much like a 301 redirect but without removing the duplicates. Get the syntax wrong, though — a relative URL, a canonical pointing at a redirect, or everything aimed at the homepage — and you can quietly push the wrong page into search results. This tool gives you the exact, normalised, absolute URL search engines prefer.

Try it

Open the Canonical Tag Generator and paste a URL. To understand the strategy behind the tag — self-referencing canonicals, when to use noindex instead, and the mistakes that hurt — read Canonical Tags Explained: Fixing Duplicate Content.

Frequently Asked Questions

Does it output the HTTP header version too?
Yes. Alongside the HTML <link> tag, it generates the equivalent Link: <url>; rel="canonical" header for non-HTML resources like PDFs.
Is my URL sent anywhere?
No. The whole tool runs in your browser. Nothing you type is uploaded or logged.

Explore more on Tools.Town Blog

Finance guides, tool launches, and engineering stories — updated weekly.

All Posts