URL normaliser

Clean a URL into a standard form: lowercase host, no default port, resolved dots, optional tracking removal.

Input

The URL to normalise.
Remove tracking parameters such as utm_source, fbclid and gclid.
Sort query parameters by name.
Remove the #fragment at the end.
Remove a slash at the end of the path (the root "/" is kept).

Result

Fill in the input and press Run.

Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.

Use it from code or an agent

curl -s https://setget.net/v1/tools/url-normalize \
  -H 'Content-Type: application/json' \
  -d '{"input":{"url":"HTTPS://Example.COM:443/a/./b/../c?b=2&a=1#top","sort_query":true,"drop_fragment":true}}'
import json, urllib.request

body = {'input': {'url': 'HTTPS://Example.COM:443/a/./b/../c?b=2&a=1#top', 'sort_query': True, 'drop_fragment': True}}
request = urllib.request.Request("https://setget.net/v1/tools/url-normalize", json.dumps(body).encode(),
                                 {"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/url-normalize", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({"input":{"url":"HTTPS://Example.COM:443/a/./b/../c?b=2&a=1#top","sort_query":true,"drop_fragment":true}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
  "slug": "url-normalize",
  "input": {
    "url": "HTTPS://Example.COM:443/a/./b/../c?b=2&a=1#top",
    "sort_query": true,
    "drop_fragment": true
  }
}
{
  "input": {
    "url": "HTTPS://Example.COM:443/a/./b/../c?b=2&a=1#top",
    "sort_query": true,
    "drop_fragment": true
  }
}

Endpoint: POST /v1/tools/url-normalize. Over MCP: run_tool with slug: "url-normalize". Machine-readable: input schema, Markdown. Connect an agent.

Inputs

NameTypeRequiredWhat it does
url string yes The URL to normalise.
strip_tracking boolean no Remove tracking parameters such as utm_source, fbclid and gclid. Default: false.
sort_query boolean no Sort query parameters by name. Default: false.
drop_fragment boolean no Remove the #fragment at the end. Default: false.
remove_trailing_slash boolean no Remove a slash at the end of the path (the root "/" is kept). Default: false.

Examples

Input
{
  "url": "HTTPS://Example.COM:443/a/./b/../c?b=2&a=1#top",
  "sort_query": true,
  "drop_fragment": true
}
Result
{
  "url": "https://example.com/a/c?a=1&b=2",
  "changed": true,
  "changes": [
    "Lowercased the scheme.",
    "Lowercased the host.",
    "Removed the default port 443.",
    "Resolved the dot segments in the path.",
    "Sorted the query parameters.",
    "Removed the fragment."
  ]
}

Strip tracking parameters

Input
{
  "url": "https://example.com/page/?utm_source=news&id=7&fbclid=abc",
  "strip_tracking": true,
  "remove_trailing_slash": true
}
Result
{
  "url": "https://example.com/page?id=7",
  "changed": true,
  "changes": [
    "Removed tracking parameters: utm_source, fbclid.",
    "Removed the trailing slash."
  ]
}

Questions

Which parameters count as tracking?
Anything starting with utm_, plus well-known click identifiers such as fbclid, gclid, msclkid, mc_eid and igshid.
Could two normalised URLs still be the same page?
Yes. Only changes that are safe by the URL standard are made. A site may still serve the same page at several addresses.