Binary, Hex, Decimal & Roman Numeral Converter Online
Convert integers of any size between bases 2–36 (binary, octal, decimal, hex, base36) and Roman numerals, with grouped binary and hex output.
Result
Press “Run” to see the result.
The base conversion API converts an integer between any bases from 2 to 36 and Roman numerals. Input is detected automatically (0x hex, 0b binary, 0o octal, Roman letters, otherwise decimal) or set with from; underscores and spaces are ignored and negative numbers are allowed. Numbers of any size are supported (no 2^53 limit), which is useful for IDs, hashes and big counters.
By default the result is given in binary, octal, decimal, hexadecimal, base36 and Roman numerals; to=2,16,roman selects the targets. The response also contains grouped binary (nibbles), upper-case hex with prefix, the decimal with thousands separators and the number of bits and bytes needed.
Roman numerals follow the standard subtractive form (IV, IX, XL, CM) from I to MMMCMXCIX (3,999); invalid forms such as IIII or VX are rejected.
Use this in your code
curl "https://apibox.io.vn/v1/base-convert?value=MMXXVI" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/base-convert?value=MMXXVI', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/base-convert?value=MMXXVI",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/base-convert?value=MMXXVI');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Is there a size limit?
Up to 2,000 characters of input; arithmetic uses big integers, so no precision is lost.
Are fractions supported?
No, integers only.
Why is roman null?
Roman numerals only exist for 1–3,999 in the standard notation.