SEO Tools
Canonical URL Generator
Clean URLs into canonical form – https, www, trailing slash, tracking parameters, index.html and # fragments – then copy rel=canonical tags or Link headers.
How to use Canonical URL Generator
Paste one or more page URLs, one per line, and choose how to treat query parameters, protocol, www and trailing slashes. The canonical tags update as you type, with a list of every change made.
- Paste the page URLsEnter one URL per line, exactly as it appears, including tracking parameters or fragments.
- Set your URL rulesChoose which parameters to keep, https, www and trailing-slash handling, and whether to drop index.html or lowercase paths.
- Copy the canonical codeCopy link tags for HTML pages, the HTTP Link header for PDFs, or plain URLs for a spreadsheet.
What the generator cleans, with an example
Take http://Example.com/blog/seo-guide/index.html?utm_source=newsletter&utm_medium=email&page=2#comments. With the default settings it becomes https://example.com/blog/seo-guide/?page=2: http is upgraded to https, the host is lowercased, index.html is dropped, both utm_ parameters are removed and the #comments fragment goes, while page stays because it changes the content. Tracking parameters include all utm_ tags and click IDs such as gclid, fbclid and msclkid. Double slashes are merged too, and a note lists every change line by line.
Choosing the right canonical URL
A canonical tag tells search engines which URL you prefer when the same content is reachable at several addresses. Pick one form and use it everywhere: with or without www, with or without a trailing slash. The canonical URL must be absolute and load directly with a 200 status, without a redirect or noindex. Use one canonical per page. Only lowercase the path if your server treats /Shoes and /shoes as the same page; otherwise the canonical may point to a URL that returns 404. Search engines treat the tag as a strong hint rather than a command.
Accuracy and data handling
Generated tags and rules must match the real page content and the site's deployment environment. The calculation runs in your current browser; the tool code does not send the input to a processing API.
FAQ
What is a canonical tag?
A link element with rel="canonical" in a page's head that names the preferred URL for that content. It helps search engines consolidate duplicates created by parameters, tracking codes or alternative paths.
Should the canonical URL keep query parameters?
Keep parameters that change the content, such as page or id, and drop tracking ones. Choose “Keep only those listed below” to keep just the parameter names you list, or remove them all.
Can I generate canonical tags for many URLs?
Yes. Paste one URL per line and each gets its own tag in the same order. Invalid lines are skipped with a message, and a warning appears if some URLs use www and others don't.
How do I add a canonical to a PDF?
Choose the HTTP Link header output. It produces a Link header with rel="canonical", which you add to the file's response headers in your server or CDN settings.
More SEO Tools
Related toolsBuild schema.org JSON-LD for nine common types with required-field checks
Convert Q&A text into FAQPage JSON-LD and matching on-page FAQ HTML
Build BreadcrumbList JSON-LD or breadcrumb HTML from a list or a single URL
Bulk-convert old and new URL pairs into Nginx, Apache, Cloudflare and Netlify redirects
Pull hostnames and root domains from URL lists, with counts and de-duplication
Extract all URLs from sitemap XML as a list, table or CSV