Canonical URL Generator
Generate a clean canonical link tag to avoid duplicate content issues.
This tool runs entirely in your browser. Your files are never uploaded to a server.
What this tool does
Parses the URL you paste and rebuilds a clean link rel="canonical" tag, with independent options to strip query parameters, force https and normalize the trailing slash on the path.
How to use it
Paste a full URL, including its protocol (e.g. https://example.com/page?ref=twitter). Toggle "Strip query parameters", "Force https" and "Add trailing slash" as needed for your site's convention; the generated tag updates immediately, and you copy it with the copy button.
Worked example
Pasting http://example.com/blog/post/?utm_source=twitter with the default options (strip query on, force https on, trailing slash off) produces a canonical tag pointing to https://example.com/blog/post: the protocol is upgraded to https, the tracking parameter is removed, and the trailing slash is stripped from the path.
Why canonical tags matter
When the same content is reachable through more than one URL — with or without tracking parameters, with or without a trailing slash, over http or https — search engines need to know which one is the "real" version to index and rank. A canonical tag tells them, consolidating ranking signals onto a single URL instead of splitting them across near-duplicate ones.
The strip query, https and trailing slash options
Stripping query parameters removes everything after "?", which is usually correct for tracking parameters like utm_source but would be wrong if a parameter genuinely changes the page's content, such as a product variant or a pagination page — check before stripping in that case. Forcing https reflects that virtually all sites now serve exclusively over https. The trailing-slash option should match whatever your site consistently uses, since /page and /page/ can otherwise be treated as two different URLs.
Limitations
This tool only reformats the URL text you provide — it doesn't verify that the resulting URL actually exists, returns a 200 status, or matches what's on the page itself. A canonical tag that points to a non-existent or unrelated URL can do more harm than not having one.
Scope, sources and privacy
The rel="canonical" mechanism follows the specification jointly documented by major search engines. Parsing and rewriting happen entirely in your browser using the URL you paste; nothing is sent to a server.
Frequently Asked Questions
- Why do I need a canonical tag?
- It tells search engines which URL is the preferred version when the same content is reachable through multiple URLs.
- Should I strip query parameters?
- Usually yes for tracking parameters like utm_source, since they create duplicate versions of the same page.
- Where does this tag go?
- Place it inside the <head> of the page it refers to.