Converts numbers between bases 2-36 with precise calculations for hex, binary, octal conversions. Use via MCP in Cursor or Windsurf for instant base conversion during development, or hit `/v1/number/base-convert` with value, source base, and target base parameters. Returns exact string representation without floating-point errors that plague manual calculations.
curl "https://tinyfn.io/v1/number/base-convert" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/number/base-convert', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/number/base-convert',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's number tools:
{
"mcpServers": {
"tinyfn-number": {
"url": "https://tinyfn.io/mcp/number",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Set source base to 16, target base to 2, and pass your hex value. For example, 'FF' in base 16 becomes '11111111' in base 2.
Supports bases 2 through 36, using digits 0-9 and letters A-Z for values above 9. Base 36 uses all alphanumeric characters.
Yes, the MCP tool provides instant base conversion in your IDE without switching contexts or opening calculators.
Yes, it uses string-based arithmetic to avoid JavaScript's floating-point limitations, ensuring precise conversion of large integers.
Returns an error if the input contains digits not valid for the specified base (like '8' in base 8 or 'G' in base 16).
Get your free API key and start using Base Convert in seconds.
Get Free API Key