EVM
Bech32 / Bech32m SegWit codec API
Encode or decode native SegWit addresses (BIP-173 bech32 for v0, BIP-350 bech32m for v1+) from/to an HRP + witness version + program, with a pure reference polymod checksum. Answers 'What program does bc1q... encode?','What is the address for this witness program?'.
Price$0.01per request
MethodPOST
Route/v1/evm/bech32
StatusLive
MIME typeapplication/json
Rate limit60/minute
CacheNo cache
evmbech32bech32msegwitbitcoinaddressencode
API URL
Integration docshttps://x402.hexl.dev/v1/evm/bech32Example request
{
"direction": "decode",
"address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
}Example response
{
"address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4",
"hrp": "bc",
"witnessVersion": 0,
"programHex": "0x751e76e8199196d454941c45d1b3a323f1433bd6",
"encoding": "bech32",
"valid": true
}Input schema
{
"type": "object",
"required": [
"direction"
],
"properties": {
"direction": {
"type": "string",
"enum": [
"encode",
"decode"
]
},
"address": {
"type": "string",
"description": "Required for decode.",
"examples": [
"bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
]
},
"hrp": {
"type": "string",
"default": "bc",
"description": "Human-readable part for encode (e.g. bc, tb)."
},
"witnessVersion": {
"type": "number",
"minimum": 0,
"maximum": 16,
"default": 0
},
"program": {
"type": "string",
"description": "Witness program hex; required for encode.",
"examples": [
"0x751e76e8199196d454941c45d1b3a323f1433bd6"
]
}
},
"examples": [
{
"direction": "decode",
"address": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4"
}
]
}Output schema
{
"type": "object",
"additionalProperties": true
}