URL Normalizer
Canonicalize URLs by lowercasing the host, resolving dot segments, sorting query keys, and removing default ports.
Canonicalize URLs for caching and deduplication
Two URLs that look different to humans may resolve to the same resource. Mixed-case hostnames, default ports, unordered query keys, and redundant path segments break string equality checks in logs, CDNs, and analytics. Normalization applies deterministic rules so you can compare, hash, or store a single canonical form.
This tool uses the browser URL API (aligned with
WHATWG URL parsing). You can lowercase the host, strip
:80 / :443, sort query parameters, optionally remove fragments or trailing slashes,
and collapse /./ and /../ segments when they appear in the path you paste.
When to normalize
- Before diffing redirect chains or webhook callback URLs
- When building cache keys for API gateways or edge workers
- After merging tracking parameters from marketing links
For resolving relative references against a base URL, use the Relative URL Resolver. To inspect components without rewriting the string, try the URL Parser.
Frequently Asked Questions
Does normalization change which page loads?
Host case and default ports are safe for HTTP semantics. Sorting query keys changes only the literal string unless your server treats parameter order as significant (uncommon). Always verify behavior on your origin.
Are duplicate query keys preserved?
Sorting reorders keys but keeps multiple values for the same key when they were present in the input. Use the URL Query Sorter if you need deduplication.
Is data sent to a server?
No. Parsing and rewriting happen entirely in your browser.