# Encoding API
> A fast, fully-local encoding toolkit: encode and decode text between base64, base64url, base32 (RFC 4648), hex, URL percent-encoding, HTML entities, binary and ASCII85 — plus JWT inspection (decode header and payload without verifying the signature). Pure server-side compute, no third-party upstream, so responses are instant and always available. Ideal for developer tools, webhooks, data pipelines, debugging and integrations.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/encoding-api/..."
```

## Pricing
- **Free** (Free) — 10,000 calls/Mo, 3 req/s
- **Basic** ($5/Mo) — 200,000 calls/Mo, 12 req/s
- **Pro** ($16/Mo) — 1,200,000 calls/Mo, 40 req/s
- **Mega** ($42/Mo) — 6,000,000 calls/Mo, 120 req/s

## Endpoints

### Encoding

#### `GET /v1/decode` — Decode text from a scheme

**Parameters:**
- `text` (query, required, string) — Encoded text Example: `aGVsbG8gd29ybGQ=`
- `from` (query, required, string) — base64, base64url, base32, hex, url, html, binary, ascii85 Example: `base64`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/encoding-api/v1/decode?text=aGVsbG8gd29ybGQ%3D&from=base64"
```

**Response:**
```json
{
    "data": {
        "input": "aGVsbG8gd29ybGQ=",
        "result": "hello world",
        "scheme": "base64"
    },
    "meta": {
        "timestamp": "2026-05-30T09:00:26.009Z",
        "request_id": "98a96bd0-7a14-40da-b197-e2150996368b"
    },
    "status": "ok",
    "message": "Decoded",
    "success": true
}
```

#### `GET /v1/encode` — Encode text into a scheme

**Parameters:**
- `text` (query, required, string) — Text to encode Example: `hello world`
- `to` (query, required, string) — base64, base64url, base32, hex, url, html, binary, ascii85 Example: `base64`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/encoding-api/v1/encode?text=hello+world&to=base64"
```

**Response:**
```json
{
    "data": {
        "input": "hello world",
        "result": "aGVsbG8gd29ybGQ=",
        "scheme": "base64"
    },
    "meta": {
        "timestamp": "2026-05-30T09:00:26.058Z",
        "request_id": "0dd172d1-bd92-420b-b4b5-042600e53b8f"
    },
    "status": "ok",
    "message": "Encoded",
    "success": true
}
```

#### `GET /v1/jwt-decode` — Inspect a JWT (no signature verify)

**Parameters:**
- `token` (query, required, string) — JWT string Example: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjMiLCJuYW1lIjoiQWRhIn0.x`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/encoding-api/v1/jwt-decode?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjMiLCJuYW1lIjoiQWRhIn0.x"
```

**Response:**
```json
{
    "data": {
        "header": {
            "alg": "HS256",
            "typ": "JWT"
        },
        "payload": {
            "sub": "123",
            "name": "Ada"
        },
        "signature_present": true
    },
    "meta": {
        "timestamp": "2026-05-30T09:00:26.134Z",
        "request_id": "07e4a603-8169-424c-97c6-6213a0bd2029"
    },
    "status": "ok",
    "message": "JWT decoded",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/encoding-api
OpenAPI spec: https://www.oanor.com/api/encoding-api/openapi.json
