Transform utilities - Base encoding

Base Encoding APIs

Encode and decode Base64, Base58 and Base32. Send JSON or plain text. Choose raw decoded bytes or a typed JSON response with the Accept header.

  • No API key
  • Six endpoints
  • Raw byte output
  • Optional JSON output

Encode or decode

POST/base{32,58,64}_encode

POST/base{32,58,64}_decode

https://aisenseapi.com/services/v1

Base64 encode and decode

# Encode
curl -X POST https://aisenseapi.com/services/v1/base64_encode \
  -H "Content-Type: application/json" \
  -d '{"data":"Hello world"}'

{ "base64_encoded_data": "SGVsbG8gd29ybGQ=" }
# Decode as raw bytes
curl -X POST https://aisenseapi.com/services/v1/base64_decode \
  -H "Content-Type: application/json" \
  -d '{"data":"SGVsbG8gd29ybGQ="}'

Hello world

Base58 encode and decode

Base58 avoids characters that are easy to confuse in print. It is often used for compact identifiers and blockchain-related formats.

{ "data": "Hello" }

{ "base58_encoded_data": "9Ajdvzr" }

Send 9Ajdvzr to /base58_decode to get the original bytes. An invalid Base58 character returns HTTP 400 with {"error":"Invalid Base58 input."}.

Base32 encode and decode

Base32 uses a smaller, case-insensitive alphabet that works well in systems where mixed case or punctuation is inconvenient.

{ "data": "Hello" }

{ "base32_encoded_data": "JBSWY3DP" }

Send JBSWY3DP to /base32_decode to retrieve Hello.

Choose raw bytes or JSON

The three decode endpoints return application/octet-stream when no Accept header is sent. This is useful for files and binary data.

Send Accept: application/json when a JSON client needs a predictable envelope:

{
  "type": "json",
  "decoded_data": { "key": "value" }
}

When the decoded bytes are not JSON, the response uses type: binary and returns the data as Base64 inside decoded_data.

Endpoint reference

EndpointJSON response key
/base64_encodebase64_encoded_data
/base58_encodebase58_encoded_data
/base32_encodebase32_encoded_data
/base64_decodeRaw bytes or type and decoded_data
/base58_decodeRaw bytes or type and decoded_data
/base32_decodeRaw bytes or type and decoded_data

Encoding is not encryption

Base64, Base58 and Base32 do not protect data. Anyone can decode the value. Do not use base encoding as a security control.

Use these endpoints when data needs a transport-safe representation. Calculate the encoding locally when the input is confidential.