Staaarter

URL Canonicalizer

Paste a URL to normalize it toward a single canonical form: the host is lowercased, common tracking parameters (utm_*, fbclid, gclid, and similar) are stripped from a documented default list, remaining query parameters are sorted alphabetically, default ports and duplicate path slashes are removed, and the trailing slash and fragment can each be toggled, so equivalent-but-different-looking URLs collapse to one form. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-08-04
By Staaarter Team
generatoron-page

Overview

Introduction

The same page is often reachable through several superficially different URLs, capitalized differently, carrying a tracking parameter, with or without a trailing slash, and each of those variants can end up as a separate entry in analytics or, worse, as a duplicate content signal to a search engine.

This tool takes one URL and produces the normalized form it would collapse to, so you can see at a glance what your canonicalization rules should actually produce for a given input.

What Is URL Canonicalizer?

A URL normalizer that lowercases the host, strips a documented list of tracking parameters, sorts the remaining query parameters alphabetically, removes default ports and duplicate path slashes, and lets you toggle the trailing slash and fragment.

It operates purely on the URL string; it doesn't fetch the page, check whether it redirects, or modify any live canonical tag.

How URL Canonicalizer Works

The input is parsed with the native URL constructor, which both validates it and exposes its parts (host, path, query, fragment) as separate, individually editable properties.

Each normalization step (host lowercasing, port stripping, slash collapsing, trailing-slash adjustment, tracking-param removal, query sorting, optional fragment removal) is applied to those parts in sequence, then the URL object is serialized back to a single string.

When To Use URL Canonicalizer

Deciding what value to put in a page's canonical tag when the page is reachable through several parameter or capitalization variants.

Cleaning a URL copied from a shared link, ad, or email before publishing it somewhere, since shared links are frequently carrying utm_ or click-id tracking parameters you don't want to propagate.

Features

Advantages

  • Strips tracking parameters from an explicit, documented list rather than a guessed heuristic, so what gets removed is predictable.
  • Sorts remaining query parameters alphabetically, which makes two URLs with the same parameters in a different order normalize to an identical result.
  • Shows the before and after side by side plus exactly which parameters were removed, instead of only producing a final URL with no explanation.

Limitations

  • The tracking-parameter list is a fixed default covering common cases (Google, Facebook, Microsoft, Mailchimp, and a few generic ones); it won't catch a custom or platform-specific tracking parameter that isn't on the list.
  • It doesn't check whether the normalized URL actually resolves, redirects, or matches your site's real canonical tag; treat its output as a starting point, not a verified live URL.

Examples

Stripping tracking parameters and sorting the rest

Input

https://Example.com/Blog/post/?utm_source=newsletter&z=1&utm_medium=email&a=2

Output

https://example.com/Blog/post?a=2&z=1

The host is lowercased, both utm_ parameters are removed, the two remaining parameters are sorted alphabetically, and the trailing slash is stripped (default toggle).

Best Practices & Notes

Best Practices

  • Apply the same trailing-slash and fragment settings across your whole site rather than deciding per URL, so the canonicalization is actually consistent.
  • Run a URL through this tool before adding it as a canonical target, rather than hand-editing out tracking parameters, since it's easy to miss one when doing it manually.

Developer Notes

canonicalizeUrl() strips tracking parameters against an exported DEFAULT_TRACKING_PARAM_NAMES list plus a utm_ prefix check, on purpose rather than a fuzzy heuristic, because a false-positive strip (removing a real functional parameter) silently changes what page the URL loads, which is a worse failure mode than under-stripping a parameter this tool's list doesn't yet know about.

URL Canonicalizer Use Cases

  • Deciding on a canonical tag value for a page reachable through multiple tracking-parameter variants
  • Cleaning up a URL before sharing it publicly after copying it from an email or ad platform
  • Checking what a batch of URLs from an analytics export would normalize to, to spot which ones are actually duplicates

Common Mistakes

  • Manually deleting query parameters by eye and missing one, especially when a URL has several tracking parameters mixed in with functional ones.
  • Picking a trailing-slash convention per page instead of site-wide, which recreates the duplicate-URL problem this tool is meant to solve.

Tips

  • After normalizing, run the result through the URL Length Checker tool, since stripping tracking parameters often meaningfully shortens a URL too.

References

Frequently Asked Questions