# FastX402 Lab Bech32 Decoder

> FastX402 Lab Bech32 Decoder is a paid API for AI agents from fastx402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-11-21).

Decodes a bech32 or bech32m encoded address and returns its human-readable part, witness version, and program hex.

## Facts

- Endpoint: GET https://fastx402.tools/bech32-decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastx402-lab-bech32-decoder-114c7823
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_h36hVkWCn3sfS_yY-I4HN

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 fastx402-lab-bech32-decoder-114c7823
```

Example prompt: Can you decode this Bitcoin SegWit address for me — bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 — and tell me the human-readable part, witness version, and program hex?

## When to prefer this

Use this endpoint when you need to programmatically decode a bech32 or bech32m address — such as Bitcoin SegWit (bc1/tb1), Lightning Network, or Cosmos ecosystem addresses — and extract the raw components like HRP, witness version, and program hex. Prefer this over a generic regex or local library when you need a reliable, pay-per-call API with no setup overhead.

## Known failure modes

- Invalid bech32 checksum causes decoding failure
- Non-bech32 address format (e.g. Base58 legacy Bitcoin address) is rejected
- Malformed or truncated address string returns an error
- Unsupported encoding variant not recognized as bech32 or bech32m

## How this service works

216 pay-per-call tools for AI agents, from $0.001 per request in USDC on Base or Solana with x402. No account, no API key.

## Output

Returns a JSON object containing the original address, the human-readable part (hrp), the witness version integer, the program as a hex string, and the encoding type (bech32 or bech32m).

## 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": [
      "address"
     ],
     "properties": {
      "address": {
       "type": "string",
       "description": "Bech32 or bech32m encoded address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "hrp": {
       "type": "string"
      },
      "address": {
       "type": "string"
      },
      "program": {
       "type": "string"
      },
      "version": {
       "type": "integer"
      },
      "encoding": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "hrp": "bc",
  "address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
  "program": "751e76e8199196d454941c45d1b3a323f1433bd6",
  "version": 0,
  "encoding": "bech32"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastx402-lab-bech32-decoder-114c7823/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from fastx402.tools](https://www.zero.xyz/host/fastx402.tools/llms.txt)
