Navigation
POST crypto

url_encode

1 credit

URL-encode a string for safe use in URLs, or decode a percent-encoded string back to plain text.

Endpoint

POST /api/v1/tools/crypto/url_encode

Body Parameters

safe string optional default: ""
text string required
action string optional default: "encode"
Options: encode decode

Example

input Request
{
    "text": "hello world&foo=bar",
    "action": "encode"
}
output Response
"hello%20world%26foo%3Dbar"

Response Format

HTTP/1.1 200 OK SUCCESS
{
  "success": true,
  "data": "hello%20world%26foo%3Dbar",
  "meta": {
    "tool": "url_encode",
    "credits_consumed": 1
  }
}
HTTP/1.1 422 Unprocessable Entity ERROR
{
  "success": false,
  "data": null,
  "error": {
    "code": "validation_error",
    "message": "The given data was invalid."
  }
}

Sign in to try this tool directly from the docs.

Code Examples
Request Example
lightbulb Developer Tip

Credits are deducted before execution. If the upstream tool fails, credits are automatically refunded to your account.