# Base64 Encoder/Decoder

> Base64 Encoder/Decoder is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.0022/call, status unknown (last checked 2026-09-14).

Encodes or decodes text using standard or URL-safe Base64 (RFC 4648), supporting JWT prep, data URIs, and API token handling

## Facts

- Endpoint: GET https://api.x402node.dev/dev/base64
- Price: $0.0022/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-a78fe81e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-tOXOXtJosJTGqqIf7Aca

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 api-x402node-dev-a78fe81e
```

Example prompt: Encode the text 'Hello, World! This is my API key: abc123' to URL-safe Base64 so I can safely embed it in a JWT header.

## When to prefer this

Use this endpoint when you need RFC 4648-compliant Base64 encoding or decoding, especially for JWT manipulation, API token formatting, data URI generation, or email MIME encoding — particularly when standard or URL-safe variants are both needed in an agentic pipeline.

## Known failure modes

- Invalid Base64 input when decoding returns error or garbled output
- Unsupported encoding mode returns error
- Empty input may return empty result or validation error
- Payment failure via x402 returns 402 status before processing

## How this service works

base64 encode, base64 decode, Base64 encoder, Base64 decoder, encode base64, decode base64, base64 encode online, base64url, URL-safe Base64, RFC 4648 encode, encode text to base64, decode base64 string, JWT prep, data URI encode, binary base64 encoding. Standard or URL-safe Base64 encoding/decoding of any text. For AI agents, JWT manipulation, API token handling, data URI generation, base64 converter Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON object with the mode used (e.g. 'encode' or 'decode'), the original input string, and the resulting Base64 or decoded string.

## 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"
     ],
     "properties": {
      "mode": {
       "type": "string",
       "description": "Operation mode (optional)"
      },
      "text": {
       "type": "string",
       "description": "Input text (required)"
      },
      "urlsafe": {
       "type": "string",
       "description": "Urlsafe (optional)"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-a78fe81e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
