Base Conversion
The /base endpoint converts a number from one numeric base to another, anywhere between base 2 and base 36.
How it works?
Digits are read as 0-9 then a-z, representing the values 0 to 35, so input is case-insensitive and the result is always lowercase. The conversion uses arbitrary-precision integers: values far beyond Number.MAX_SAFE_INTEGER keep every digit intact. A leading minus sign is preserved, except when the value is zero (-0 returns 0).
curl -X GET \ "https://api.moxon.dev/v6/base"Send the request to see the response here.
valuestringrequiredNumber to convert, optionally prefixed with
-. Up to 100 characters, valid for thefrombasefromstringoptionalInput base, an integer between 2 and 36. Default:
10tostringoptionalOutput base, an integer between 2 and 36. Default:
16
valuestringThe original input value, as provided
fromnumberInput base used for the conversion
tonumberOutput base used for the conversion
resultstringThe converted value, in lowercase digits
If parameters are missing or invalid, the API will return an error:
- 400
Please provide a value (?value={value})Thevalueparameter is missing - 400
Value must be 100 characters or fewerThevalueexceeds the maximum length - 400
Base must be a numberfromortois not an integer - 400
Base must be between 2 and 36fromortois outside the supported range - 400
Invalid value for base {from}A digit ofvaluedoes not exist in the input base, orvalueis only a minus sign
Last updated on September 12, 2026