Number base converter | Convert Numbers with Ease
Convert numbers between bases: binary, decimal, octal, and hexadecimal. Includes detailed conversion steps for learning number systems.
What Is a Number Base Converter?
Convert numbers between different number bases (decimal, binary, hexadecimal, etc.)
What Is a Number Base Converter?
A number base converter changes a number between number systems — binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Computers use binary and hex; people use decimal.
How to Use
- Enter your number in the input field
- Select the base of your input number (e.g., 16 for hexadecimal)
- Choose the desired output base
- Click Convert to see the result
The Same Value in Four Bases
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
Each base writes the same value differently; hexadecimal is a compact way to show binary.
Key Features
- Support for bases 2 through 36
- Common base conversions (binary, octal, decimal, hex)
- Case-insensitive input for letters
- One-click result copying
Common Use Cases
- Converting between decimal and binary
- Working with hexadecimal color codes
- Computer science calculations
- Digital electronics work
Use this tool from your AI agent
Free JSON API and Model Context Protocol (MCP) server. No signup, no API key, CORS open. Designed for Claude, ChatGPT, Cursor, scripts and frontend apps.
curl -X POST https://mate.tools/api/v1/number-base.php \
-H "Content-Type: application/json" \
-d '{"value":"ff","from_base":16,"to_bases":[2,10,16,"roman"]}' import urllib.request, json
req = urllib.request.Request(
"https://mate.tools/api/v1/number-base.php",
data=json.dumps({"value":"ff","from_base":16,"to_bases":[2,10,16,"roman"]}).encode(),
headers={"Content-Type": "application/json"},
)
with urllib.request.urlopen(req) as r:
print(json.load(r)) const r = await fetch("https://mate.tools/api/v1/number-base.php", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({"value":"ff","from_base":16,"to_bases":[2,10,16,"roman"]}),
});
console.log(await r.json()); Add to claude_desktop_config.json (Claude Desktop), ~/.cursor/mcp.json (Cursor), or any other MCP-compatible client:
{
"mcpServers": {
"mate-tools": {
"command": "npx",
"args": ["-y", "@mate-tools/mcp-server"]
}
}
}