Number Base Converter
Convert an integer between any two bases from 2 to 36 with arbitrary-precision arithmetic.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
Converted 255 from base 10 to base 16, giving FF.
How it works
- Read every digit of the input in base 10 and accumulated an exact integer.
- Repeatedly divided by the target base and read the remainders to produce the target digits.
- Rendered the result with the digits 0-9A-Z.
- Arbitrary-precision arithmetic means values larger than 2^53 are converted exactly.
Methodology
- Validate the value as a signed integer and both bases as integers from 2 to 36.
- Accumulate the exact value by iterating the input digits, multiplying by the source base and adding each digit.
- Produce the target digits by repeated division with remainder, then restore the sign.
Usage
- Enter the integer to convert.
- Choose the source and target bases from 2 to 36.
- Read the converted result.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Decimal to hexadecimal
{
"value": "255",
"fromBase": 10,
"toBase": 16
}Binary to decimal
{
"value": "11111111",
"fromBase": 2,
"toBase": 10
}Big integer stays exact
{
"value": "123456789012345678901234567890",
"fromBase": 10,
"toBase": 16
}Limitations
Positional notation
Every positional number system expresses a value as a sum of digits times a power of the base. Converting changes only the representation, never the value, which is why the result can be converted back exactly.
Frequently asked questions
- Can it convert a very large number exactly?
- Yes. The converter uses arbitrary-precision arithmetic, so a value such as 123456789012345678901234567890 is converted exactly rather than being rounded to a floating-point value.
- Does it support negative numbers?
- Yes. A leading minus sign is preserved and the magnitude is converted with the same rules.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.