URL encodes strings by converting special characters to percent-encoded format (%20 for spaces, %3A for colons, etc.). Access via MCP in Cursor or Windsurf, or call GET /v1/slug/url-encode with your text. Essential for building query parameters, form data, or any URL component containing reserved characters. Returns RFC 3986 compliant encoding.
curl "https://tinyfn.io/v1/slug/url-encode" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/slug/url-encode', {
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/url-encode',
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"
}
}
}
}
Converts spaces to %20, special characters like @#$%^&*()+={}[]|\:;"'<>,.?/ to their percent-encoded equivalents, and non-ASCII characters to UTF-8 byte sequences.
Use the url-encode tool in Cursor, Windsurf, or other MCP clients to encode parameter values before building URLs. Perfect for handling user input with spaces or special characters.
Encodes the input string only — not a full URL. Use it for individual components like query parameter values, form field data, or path segments that contain special characters.
URL encoding uses percent notation (%20) for web-safe characters, while base64 creates entirely different character sequences. URL encoding preserves readability for simple text.
Yes, Unicode characters are converted to UTF-8 bytes then percent-encoded. For example, 🚀 becomes %F0%9F%9A%80 in the encoded output.