URL Normalizer
Normalize URLs by removing defaults and sorting params
Normalization Options
Input URLs
Normalized URLs
Normalized URLs will appear here
URL Normalization
Normalization converts URLs to a canonical form for comparison, caching, or deduplication. It handles: case folding, default port removal, path normalization, query parameter sorting, and removing tracking parameters.
The URL Normalizer applies RFC 3986 transformations to produce canonical URL forms, making it easy to compare, deduplicate, and cache URLs that look different but resolve to the same resource. Paste a URL like HTTP://Example.COM:443/a/../b?z=1&a=2 and get back the clean canonical form https://example.com/b?a=2&z=1 with a before/after breakdown of every change applied.
Understanding URL Normalization
If you have ever looked at a list of URLs in an analytics dashboard and noticed that the same page appears under three or four slightly different addresses, you already know why normalization matters. A user might visit https://example.com/Products, another arrives at https://example.com/products/, and a third clicks a link to https://example.com:443/products?utm_source=twitter. All three point to the same resource, but without normalization your cache stores three copies, your analytics splits the traffic across three rows, and your web crawler visits the same page three times.
URL normalization is the process of transforming a URL into a standard, canonical form so that equivalent URLs produce the same string. The rules come primarily from RFC 3986, which defines the syntax of URIs and specifies which transformations are safe to apply without changing the resource a URL points to. Some transformations are guaranteed to preserve meaning -- lowercasing the scheme and host, removing default ports, resolving dot segments -- while others depend on how the server behaves and are treated as optional.
This tool applies both categories of transformation and lets you toggle the optional ones on or off. You can strip tracking parameters like utm_source and fbclid, sort query parameters into alphabetical order for consistent cache keys, remove fragments that only affect client-side behavior, and collapse redundant slashes. The before/after comparison highlights exactly what changed so you can verify every transformation before adopting it in your pipeline.
How to Normalize a URL
- Paste the URL you want to normalize into the input field.
- Select which optional transformations to apply (sort query parameters, remove tracking parameters, strip fragments, etc.).
- Click Normalize to generate the canonical form.
- Review the before/after comparison showing each change that was applied.
URL Normalization Examples
| Input URL | Normalized Output | Changes Applied |
|---|---|---|
HTTP://Example.COM/path | http://example.com/path | Scheme and host lowercased |
https://example.com:443/page | https://example.com/page | Default port 443 removed |
http://example.com:80/page | http://example.com/page | Default port 80 removed |
https://example.com/a/../b/./c | https://example.com/b/c | Dot segments resolved |
https://example.com/search?z=1&a=2 | https://example.com/search?a=2&z=1 | Query parameters sorted |
https://example.com/%7Euser | https://example.com/~user | Unreserved character decoded |
https://example.com/page?utm_source=twitter&id=5 | https://example.com/page?id=5 | Tracking parameter removed |
https://example.com/path//to///page | https://example.com/path/to/page | Multiple slashes collapsed |
When to Use the URL Normalizer
- Deduplication in web crawlers -- Avoid crawling the same page multiple times when URLs differ only in casing, default ports, or parameter order.
- Cache key generation -- Produce consistent cache keys so that
example.com:443/pageandexample.com/pageshare the same cached response. - Analytics URL grouping -- Aggregate page views when the same content is reached through URLs with different tracking parameters or fragments.
- Security policy matching -- Ensure URL comparison in CSP directives, CORS allowlists, and access control rules handles equivalent URLs consistently.
- Database key consistency -- Store a single canonical URL per resource instead of allowing duplicates caused by parameter reordering.
- Link inventory cleanup -- Clean up exported bookmark files, sitemap entries, or CMS link lists before auditing for broken links.
How URL Normalization Works
URL normalization applies a series of transformations defined in RFC 3986 Section 6, divided into two categories.
Safe Normalizations (Semantics-Preserving)
These transformations never change which resource a URL points to:
- Case normalization -- Scheme (
http) and host (example.com) are case-insensitive per the spec, so they are lowered to a consistent form. - Percent-encoding normalization -- Hex digits in percent-encoded characters are uppercased (
%2fbecomes%2F), and unreserved characters (letters, digits,-._~) are decoded since encoding them is unnecessary. - Default port removal -- Port
80forhttpand port443forhttpsare removed because they are implied. - Dot segment resolution -- Path segments like
.(current directory) and..(parent directory) are resolved:/a/b/../cbecomes/a/c.
Optional Normalizations
These may change semantics depending on the server, so they are configurable:
- Query parameter sorting -- Alphabetical sorting produces a canonical parameter order, useful when servers treat
?a=1&b=2and?b=2&a=1identically. - Tracking parameter removal -- Strips common marketing parameters like
utm_source,utm_medium,utm_campaign,fbclid, andgclid. - Fragment removal -- Strips the
#fragmentportion, which is typically client-side only. - Trailing slash normalization -- Adds or removes trailing slashes for directory-style URLs.
- Slash collapsing -- Reduces consecutive slashes (
//) in the path to a single slash.
Normalization Pipeline Example
Starting with HTTP://Example.COM:443/docs/../api//v2?z=3&a=1&utm_source=ad#top:
Step 1 Lowercase scheme: http://Example.COM:443/docs/../api//v2?z=3&a=1&utm_source=ad#top
Step 2 Lowercase host: http://example.com:443/docs/../api//v2?z=3&a=1&utm_source=ad#top
Step 3 Remove default port: http://example.com/docs/../api//v2?z=3&a=1&utm_source=ad#top
Step 4 Resolve dot segments: http://example.com/api//v2?z=3&a=1&utm_source=ad#top
Step 5 Collapse slashes: http://example.com/api/v2?z=3&a=1&utm_source=ad#top
Step 6 Sort query params: http://example.com/api/v2?a=1&utm_source=ad&z=3#top
Step 7 Remove tracking: http://example.com/api/v2?a=1&z=3#top
Step 8 Remove fragment: http://example.com/api/v2?a=1&z=3
Practical Tips for URL Normalization
The biggest pitfall with normalization is applying optional transformations blindly. Sorting query parameters is safe for the vast majority of web servers and frameworks -- Express, Django, Rails, Spring, and Laravel all treat parameter order as irrelevant -- but a small number of legacy systems use parameter position to distinguish between values. Before enabling parameter sorting in production, test a handful of representative URLs against your server to make sure the responses are identical regardless of order.
Tracking parameter removal is another area where overzealous rules can cause problems. The standard UTM parameters (utm_source, utm_medium, utm_campaign, utm_term, utm_content) are always safe to strip because they are consumed by analytics tools and never affect server-side content. Parameters like fbclid and gclid are similarly safe. But some applications use custom parameters that look like tracking -- for instance, ref might be used for affiliate attribution that actually changes the displayed content. Review the tracking parameter list carefully and only remove parameters you are certain are purely analytical.
If you are building a crawler or link checker, normalize URLs before adding them to your visited-URL set. This single step can reduce your crawl time dramatically by preventing re-visits to pages that differ only in casing, default ports, or trailing slashes. Pair normalization with robots.txt and canonical tag checking for a complete deduplication strategy.
Frequently Asked Questions
Does normalizing a URL change where it points?
Safe normalizations (case, percent-encoding, default port, dot segments) are guaranteed by RFC 3986 to preserve meaning. Optional normalizations like query sorting or tracking parameter removal may change meaning on servers that treat parameter order or tracking parameters as significant, which is why they are togglable.
Should I sort query parameters in my application?
If you control the server and it ignores parameter order, sorting is highly recommended for cache efficiency and deduplication. Most web frameworks treat ?a=1&b=2 and ?b=2&a=1 identically, making sorted parameters a safe default.
What tracking parameters does the tool strip?
The tool removes widely-used marketing parameters including utm_source, utm_medium, utm_campaign, utm_term, utm_content, fbclid, gclid, mc_eid, and similar analytics identifiers. The exact list is configurable.
Is URL normalization the same as URL canonicalization?
They overlap significantly but are not identical. Normalization refers specifically to the RFC 3986 transformations that produce a standard form. Canonicalization is a broader concept that can include server-specific rules, such as choosing www vs. non-www, selecting a preferred protocol (HTTPS over HTTP), or resolving content-level duplicates identified by <link rel="canonical"> tags. Normalization is one step within a full canonicalization strategy.
Can normalization break URLs with encoded path characters?
Safe normalization only decodes unreserved characters (letters, digits, -._~). Reserved characters like / (%2F) and ? (%3F) remain encoded because decoding them would change the URL structure. If a path intentionally contains %2F to represent a literal slash within a path segment (not a separator), normalization preserves it correctly.
How does normalization handle internationalized domain names (IDN)?
Internationalized domains can appear in Unicode form (exemple.fr) or Punycode form (xn--exemple-9ua.fr). This tool normalizes the host to its lowercase ASCII form but does not convert between Unicode and Punycode. For IDN consistency, pair this tool with a dedicated IDN converter.
Related Tools
- URL Parser - Break URLs into individual components like scheme, host, port, path, and query
- Query String Parser/Builder - Parse and build URL query strings with proper encoding
- Bulk Add/Remove Query Params - Add or remove query parameters from multiple URLs at once
- HTTP Header Formatter - Convert between raw and key/value header formats
- curl Command Builder - Build curl commands to test normalized URLs against your server