Base32 Decode API Endpoint - Free Public API

Endpoint URL:

https://aisenseapi.com/services/v1/base32_decode

Description:

This endpoint decodes a Base32-encoded string back into its original format. It accepts input either as JSON with a data field containing the Base32-encoded string or as plain text. The response format can be JSON (default) or raw binary based on the Accept header.

If the input is invalid, an appropriate error message will be returned.

Response Format

  • Content-Type: application/json (default) or application/octet-stream (for binary data)

Example Success Response (JSON)

When the client requests JSON (default behavior): json

{
 "type": "json",
 "decoded_data": "Hello world"
}

If the decoded data is binary, it will be Base64-encoded in the JSON response: json

{
 "type": "binary",
 "encoding": "base64",
 "decoded_data": "SGVsbG8gd29ybGQ="
}

Example Success Response (Binary)

When the client sets the Accept: application/octet-stream header, the decoded data will be streamed as raw binary with these headers:

Content-Type: application/octet-stream
Content-Disposition: attachment; filename="decoded_data.bin"

This will trigger a file download in most browsers.

Example Error Responses

{ "error": "Invalid data provided. Expected a string." }
 
{ "error": "No data to decode or invalid input." }
 
{ "error": "Invalid Base32 input." }
 
{ "error": "Unsupported Accept header." }

Input Requirements

  • JSON Input Example: json

    { "data": "JBSWY3DPEB3W64TMMQ======" }
  • Plain Text Input Example (with Content-Type: text/plain):

    JBSWY3DPEB3W64TMMQ======

Use Cases

  • Decoding Base32 strings for data processing or display
  • Reverting encoded text or binary data to its original form
  • Handling Base32-encoded data in APIs, databases, or communication protocols
  • Exporting binary files directly from encoded input

How to Use

  1. Send a POST request to:

    https://aisenseapi.com/services/v1/base32_decode
  2. Choose your input format:

    • JSON input: json
      { "data": "JBSWY3DPEB3W64TMMQ======" }
    • Plain text input:
      JBSWY3DPEB3W64TMMQ======
  3. Specify the desired response format:

    • JSON response (default):
      Add the header Accept: application/json
    • Binary response:
      Add the header Accept: application/octet-stream
  4. Handle the response:

    • If the input is valid, the response will contain the decoded data.
    • If the input is invalid or missing, an error message will be returned.

Example cURL Requests

JSON Input with JSON Response:

curl -X POST https://aisenseapi.com/services/v1/base32_decode \
-H "Content-Type: application/json" \
-d '{"data":"JBSWY3DPEB3W64TMMQ======"}'

Plain Text Input with Binary Response:

curl -X POST https://aisenseapi.com/services/v1/base32_decode \
-H "Content-Type: text/plain" \
-H "Accept: application/octet-stream" \
--data "JBSWY3DPEB3W64TMMQ======" \
-o output.bin

Key Features

  • Supports both JSON and plain text input formats
  • Flexible output: JSON (default) or binary based on the Accept header
  • Clear error messages for invalid input
  • Free and public API—no authentication required
Scroll to Top