Converts URLs to a standardized canonical format by removing query parameters, fragments, and redundant elements. Use via MCP in Cursor or Windsurf, or call GET /v1/slug/normalize-url with your URL. Example: "https://example.com/page/?utm=123#section" becomes "https://example.com/page/". Essential for deduplication, caching, and consistent URL handling across AI agent workflows.
curl "https://tinyfn.io/v1/slug/normalize-url" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/slug/normalize-url', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/slug/normalize-url',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's url/slug tools:
{
"mcpServers": {
"tinyfn-slug": {
"url": "https://tinyfn.io/mcp/slug",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Removes query parameters, URL fragments (#sections), trailing slashes inconsistencies, and redundant path elements like '..' and '.'. Preserves the core path structure.
Call the normalize-url tool with your URL as input. The MCP tool returns the canonical form immediately, perfect for AI agents processing web data.
Yes, it properly handles IDNs and Unicode characters in URLs, converting them to their canonical ASCII representation when needed.
No, the tool processes one URL per request. For bulk operations, make multiple calls or use it within AI agent loops.
The tool attempts to parse and normalize what it can, but severely malformed URLs may return an error or the original input unchanged.
Get your free API key and start using Normalize Url in seconds.
Get Free API Key