Catalog/encoding-base62

Encoding

Base62 big-integer codec API

Encodes/decodes bytes as base62 (0-9A-Za-z) using big-integer radix conversion, preserving leading-zero bytes — the scheme used for short IDs and URL slugs. Answers 'What is the base62 of these bytes?', 'Decode this base62 token.'

Price$0.01per request
MethodPOST
Route/v1/encoding/base62
StatusLive
MIME typeapplication/json
Rate limit120/minute
Cache0s public
base62shortidurl-slugencodedecodecodecbigintencoding
API URLhttps://x402.hexl.dev/v1/encoding/base62
Integration docs
Example request
{
  "value": "deadbeef",
  "inputEncoding": "hex"
}
Example response
{
  "operation": "encode",
  "result": "44pZgF",
  "leadingZeros": 0,
  "interpretation": "Encoded 4 bytes to base62 (big-integer radix)."
}
Input schema
{
  "type": "object",
  "required": [
    "value"
  ],
  "properties": {
    "value": {
      "type": "string",
      "examples": [
        "deadbeef"
      ]
    },
    "operation": {
      "type": "string",
      "enum": [
        "encode",
        "decode"
      ]
    },
    "inputEncoding": {
      "type": "string",
      "examples": [
        "hex",
        "utf8",
        "base64"
      ]
    }
  }
}
Output schema
{
  "type": "object",
  "additionalProperties": true
}