{ }

Encoding and Decoding REST API

Supported encoders are available as small JSON endpoints. Open CORS, no authentication required for the free tier, with up to 10,000 requests per IP per UTC day.

Request format

GET  /api/v1/<tool>?action=<encode|decode>&input=<text>[&option=value]
POST /api/v1/<tool>
Content-Type: application/json

{ "action": "encode", "input": "...", "options": { ... } }

The response is always the same shape: a JSON object with either a result string or an error string and an HTTP status of 400.

API examples

Base64 encode:

curl 'https://encode-decode.org/api/v1/base64?action=encode&input=hello'
# → { "result": "aGVsbG8=", "tool": "base64", "action": "encode" }

SHA-256 hash via POST:

curl -X POST https://encode-decode.org/api/v1/hash \
  -H 'content-type: application/json' \
  -d '{ "action": "encode", "input": "hello", "options": { "algorithm": "sha-256" } }'

Rate limits & abuse

The free tier is 10,000 requests per IP per UTC day. Requests above that limit return 429 Too Many Requests with a Retry-After header. Cache repeated results when you use the API in production workflows.

All input is processed in memory and discarded after the response is sent. No request body is ever logged.