URL/Slug Utilities

Url Encode

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.

API Endpoint

GET /v1/slug/url-encode

Code Examples

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)

Use via MCP

Add to your AI agent

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"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

What characters does URL encoding convert?

Converts spaces to %20, special characters like @#$%^&*()+={}[]|\:;"'<>,.?/ to their percent-encoded equivalents, and non-ASCII characters to UTF-8 byte sequences.

How do I URL encode query parameters in MCP tools?

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.

Does this encode the entire URL or just components?

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.

What's the difference between URL encoding and base64 encoding?

URL encoding uses percent notation (%20) for web-safe characters, while base64 creates entirely different character sequences. URL encoding preserves readability for simple text.

Can I encode Unicode characters like emojis?

Yes, Unicode characters are converted to UTF-8 bytes then percent-encoded. For example, 🚀 becomes %F0%9F%9A%80 in the encoded output.

Try Url Encode Now

Get your free API key and start using Url Encode in seconds.

Get Free API Key