Base32 Encode API Endpoint - Free Public API
Endpoint URL:
https://aisenseapi.com/services/v1/base32_encode
Description:
This endpoint encodes the provided input into Base32 format. It accepts input as JSON, plain text, or as a file upload. The API processes the input, encodes it in Base32, and returns the encoded string in a JSON response. If the input is invalid or missing, an appropriate error message will be returned.
Response Format
- Content-Type:
application/json
Example Success Response
{
"base32_encoded_data": "JBSWY3DPEBLW64TMMQ======"
}
Example Error Responses
{ "error": "Invalid data provided. Expected a string." }{ "error": "No data to encode or invalid input." }{ "error": "An unexpected error occurred: error details" }
Input Requirements
The API accepts input in three formats:
JSON Input json
{ "data": "Hello World" }Plain Text Input
Send raw text withContent-Type: text/plain:Hello WorldFile Upload
Send a file usingmultipart/form-dataunder the keyqrcode_image. The file content will be Base32 encoded.
Use Cases
- Encoding sensitive data for secure transmission or storage
- Generating Base32-encoded strings for API integrations or data processing
- Converting binary data into text for compatibility with text-based systems
- Preparing data for TOTP (Two-Factor Authentication) or QR code generation
How to Use
1. Send a POST request to
https://aisenseapi.com/services/v1/base32_encode
2. Choose your input format
JSON input json
{ "data": "Hello World" }Plain text input
Hello WorldFile upload
- Upload a file under the key
qrcode_image:curl -X POST https://aisenseapi.com/services/v1/base32_encode \ -F "qrcode_image=@/path/to/file.txt"
- Upload a file under the key
3. Handle the response
- If the input is valid, the response contains the Base32-encoded string.
- If the input is missing or invalid, an error message is returned.
Example cURL Requests
Base32 Encode from JSON Input
curl -X POST https://aisenseapi.com/services/v1/base32_encode \
-H "Content-Type: application/json" \
-d '{"data":"Hello World"}'
Base32 Encode from Plain Text Input
curl -X POST https://aisenseapi.com/services/v1/base32_encode \
-H "Content-Type: text/plain" \
--data "Hello World"
Base32 Encode from File Upload
curl -X POST https://aisenseapi.com/services/v1/base32_encode \
-F "qrcode_image=@/path/to/file.txt"
Key Features
- Supports JSON, plain text, and file input
- Returns the Base32-encoded string in the response
- Ensures clear error handling for invalid input
- No authentication required – free public API