URL Encoder / Decoder

Use Encode to prepare text for a URL (e.g., spaces to `%20`). Use Decode to read an encoded URL.

API Access

Use this tool programmatically via our REST API. Perfect for integrating URL encoding/decoding into your applications, scripts, or workflows.

Endpoint

POST https://toolteeno.com/api/url-encode

Request Body

{
  "text": "string",     // Required: Text or URL to encode/decode
  "mode": "encode|decode" // Required: Operation mode
}

Example Response (Encode)

{
  "success": true,
  "mode": "encode",
  "input": "https://example.com/search?q=hello world",
  "output": "https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world"
}

Example Response (Decode)

{
  "success": true,
  "mode": "decode",
  "input": "https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world",
  "output": "https://example.com/search?q=hello world"
}

cURL Example

curl -X POST https://toolteeno.com/api/url-encode \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello World! How are you?",
    "mode": "encode"
  }'

JavaScript/Fetch Example

const response = await fetch('https://toolteeno.com/api/url-encode', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    text: 'https://example.com/search?q=hello world&lang=en',
    mode: 'encode'
  })
});

const data = await response.json();
console.log(data.output);
// Output: "https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world%26lang%3Den"

Python Example

import requests

response = requests.post(
    'https://toolteeno.com/api/url-encode',
    json={
        'text': 'user@example.com',
        'mode': 'encode'
    }
)

result = response.json()
print(result['output'])
# Output: "user%40example.com"

Common Use Cases

  • Encoding query parameters in URLs
  • Preparing text for URL transmission
  • Decoding URL parameters from query strings
  • Handling special characters in API requests
  • Processing form data submissions

This API is completely free to use with no rate limits or authentication required!