Hex decode
Try it interactively →POST /api/hex-decodeDecode hex-encoded bytes back to binary. Tolerant of whitespace, the `0x` prefix, and `:` separators (such as colon-separated MAC-address style hex).
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| data* | string | — | Hex string to decode. |
Response
Modes: binary, base64-json. Cache: yes (24h TTL).
Code samples
Built from the hello example.
curl -X POST https://api.xtract.bot/api/hex-decode \
-H "Content-Type: application/json" \
-H "Accept: application/octet-stream" \
-H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
-H "X-Api-Key: $XTRACT_API_KEY" \
-d '{
"data": "68656c6c6f"
}'