Base Number Converter
Convert numbers between any bases (2–36) with binary, octal, decimal, and hex output
/v1/base-convert
curl "https://devtools.toolkitapi.io/v1/base-convert?value=255&from_base=10&to_base=16"
import httpx
resp = httpx.get(
"https://devtools.toolkitapi.io/v1/base-convert?value=255&from_base=10&to_base=16",
)
print(resp.json())
const resp = await fetch("https://devtools.toolkitapi.io/v1/base-convert?value=255&from_base=10&to_base=16", {
});
const data = await resp.json();
console.log(data);
# See curl example
{
"input": "255",
"from_base": 10,
"to_base": 16,
"decimal": 255,
"result": "FF",
"all_bases": {
"binary": "11111111",
"octal": "377",
"decimal": "255",
"hexadecimal": "FF"
}
}
Try It Live
Description
How to Use
1. Pass the number as `value`, its current base as `from_base`, and the target base as `to_base`.
2. The `result` field contains the converted value in the target base.
3. The `all_bases` object always provides the value in binary (2), octal (8), decimal (10), and hexadecimal (16) regardless of the target base.
About This Tool
Base Number Converter converts a number from any base (2–36) to any other base, and always includes the value in binary, octal, decimal, and hexadecimal for quick reference.
Pass a value in its source base and the target base, and get back the converted result plus all four standard representations.
Why Use This Tool
- Low-level debugging — Convert between hex, binary, and decimal while inspecting memory or registers
- Bitwise analysis — See binary representations for flag/mask values
- Encoding work — Convert between base-2, base-16, and base-36 encodings
- Education — Visualise how a number looks across different bases
Frequently Asked Questions
What bases are supported?
Does it support negative numbers?
What if the value isn't valid for the source base?
Start using Base Number Converter now
Get your free API key and make your first request in under a minute.