# Classic Ciphers and Encodings – Base Encoding/Decoding

> Classic Ciphers and Encodings – Base Encoding/Decoding is a paid API for AI agents from text-ciphers.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-21).

Converts text or bytes to and from binary, octal, hex, decimal, Base32, Base58 (Bitcoin), Base64, and related encodings.

## Facts

- Endpoint: GET https://text-ciphers.x402tookit.com/encode-text?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/classic-ciphers-and-encodings-base-encoding-decoding-717e7071
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_PtgJGKaeuxWS-jSW0w3aK

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability classic-ciphers-and-encodings-base-encoding-decoding-717e7071
```

Example prompt: Encode the text 'Hello, World!' as Base64 for me.

## When to prefer this

Choose this endpoint when you need fast, reliable encoding or decoding between common base formats (binary, octal, hex, decimal, Base32, Base58, Base64, Base64url) for text or byte data. Prefer it over cipher-based siblings when you need standard interoperable encodings rather than classical substitution ciphers. Ideal for developer tasks like preparing HTTP headers, encoding binary payloads, or inspecting raw byte values.

## Known failure modes

- Missing required 'text' or 'format' query parameter returns an error
- Invalid 'format' value (not in allowed enum) returns a validation error
- Input text exceeds 3000 character limit and is rejected
- Invalid hex input when inputType=hex causes a parsing error
- Attempting to decode malformed Base64/Base32 returns a decoding error

## How this service works

Convert text or bytes to and from binary, octal, hex, decimal, Base32 (RFC 4648), Base58 (Bitcoin) and Base64.

## Output

Returns a JSON object containing the encoded or decoded output string, the format used, the mode (encode or decode), input echo, byte count, and a hex representation of the result. Also includes metadata fields like source, asOf timestamp, and security/degraded flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text",
      "format"
     ],
     "properties": {
      "mode": {
       "type": "string",
       "description": "encode (default) or decode"
      },
      "text": {
       "type": "string",
       "description": "Text to encode, or the encoded string to decode (up to 3000 characters)"
      },
      "format": {
       "type": "string",
       "description": "One of: binary, octal, hex, decimal, base32, base32hex, base58, base64, base64url"
      },
      "inputType": {
       "type": "string",
       "description": "For encode: text (UTF-8, default) or hex (the input is bytes written as hex)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "hex": {
       "type": [
        "null",
        "string"
       ]
      },
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "mode": {
       "type": [
        "null",
        "string"
       ]
      },
      "bytes": {
       "type": [
        "null",
        "number"
       ]
      },
      "input": {
       "type": [
        "null",
        "string"
       ]
      },
      "format": {
       "type": [
        "null",
        "string"
       ]
      },
      "output": {
       "type": [
        "null",
        "string"
       ]
      },
      "secure": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "disclaimer": {
       
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/classic-ciphers-and-encodings-base-encoding-decoding-717e7071/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from text-ciphers.x402tookit.com](https://www.zero.xyz/host/text-ciphers.x402tookit.com/llms.txt)
