Integer conversion between arbitrary numeric bases 2–36
num_radixConvert an integer between any two numeric bases from 2 to 36, with arbitrary precision so values far beyond 2^53 are exact. Accepts an optional sign and common prefixes (0x, 0b, 0o), validates every digit against the source base, and returns the value in the target base, in decimal, and as its bit length and digit count. Price: $0.05 per successful call, paid over x402 (USDC on Base).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Target base 2-36, default 10. Accepted: integer 2-36. | |
| case | No | Digit case for bases above 10: lower (default) or upper. Accepted: lower, upper. | |
| from | No | Source base 2-36, or auto (default) to read a 0x/0b/0o prefix. Accepted: integer 2-36, or 'auto'. | |
| value | Yes | Integer to convert; optional sign and 0x/0b/0o prefix. Accepted: at most 1024 characters. | |
| prefix | No | Emit 0x/0b/0o where conventional. Default false. Accepted: true or false. |