URL Canonicalizer
Normalize URLs into a single canonical form: lowercase the scheme and host, strip default ports, resolve ./.. path segments, sort query parameters, remove tracking params (utm_*, fbclid, gclid…), drop fragments and collapse duplicate slashes. Runs entirely in your browser — one URL per line.
Input
Output
Guides
The URL Canonicalizer rewrites messy, inconsistent URLs into a single, predictable canonical form. Two links that point to the same resource — HTTP://Example.COM:80/a/../b and http://example.com/b — should be treated as one. This tool applies the standard set of URL normalization rules so you get exactly that, one clean URL per line, entirely in your browser.
What it normalizes
Every URL is parsed with the browser's built-in WHATWG URL engine, which guarantees a few normalizations are always applied:
- Lowercase scheme —
HTTP://becomeshttp:// - Lowercase host —
Example.COMbecomesexample.com(the path and query keep their original case, because they are case-sensitive) - Strip default ports —
:80onhttp,:443onhttps,:21onftp - Resolve dot segments —
/a/../b/./ccollapses to/b/c - Drop a lone empty query — a trailing
?with nothing after it is removed
On top of that, five optional rules are each toggleable:
- Decode unreserved characters — percent-encoded letters, digits,
-,.,_and~are decoded (%41→A); everything else keeps its encoding, with hex digits uppercased for consistency - Collapse duplicate slashes —
/a//b///cbecomes/a/b/c - Sort query parameters —
?z=1&a=2becomes?a=2&z=1, so parameter order stops mattering - Remove tracking parameters — strips
utm_*,fbclid,gclid,msclkid,mc_cidand other common analytics/click-tracking keys - Remove the fragment — deletes everything after
#
How to use it
- Paste one or more URLs into the input box, one per line.
- Tick or untick the normalization rules you want.
- The canonical URLs appear instantly in the output, aligned line-for-line with your input. Any line that can't be parsed as a URL is returned as
Invalid URL: …so nothing is silently dropped.
If a URL has no scheme, https:// is assumed so that bare hostnames like example.com/path still normalize.
Is this the same as following redirects?
No — and that is deliberate. This is a pure string transform: it never contacts the server, follows a redirect, or resolves DNS. It tells you the canonical spelling of the URL you typed, not where that URL ultimately lands. That makes it fast, private, and safe to run on thousands of URLs at once.
Why sort query parameters?
For caching, deduplication and SEO, ?a=1&b=2 and ?b=2&a=1 are the same resource but different strings. Sorting them alphabetically gives one stable key you can compare, store, or use as a canonical link.
Is my data sent anywhere?
No. All processing happens locally in your browser. URLs never leave your device.