Free browser converter
Base Converter
Convert exact non-negative integers between bases 2 and 36. Every digit is validated, and BigInt keeps values beyond JavaScript's safe integer range precise.
Interactive tool
Convert integers in bases 2 through 36 to another number base
Ready
Choose the exact representation you need; the tool does not guess an encoding.
Detailed conversion guide
How the Base Converter Works
Choose an input base and an output base from 2 through 36. Digits 0-9 represent zero through nine; letters A-Z represent ten through thirty-five. Decimal 255 becomes FF in base 16.
The converter accumulates the integer with BigInt and renders it in the target base, so it does not round values above 2^53-1. Prefixes 0b, 0o, and 0x are accepted only for bases 2, 8, and 16.
| Input | Output | Meaning |
|---|---|---|
11111111 (base 2) | FF (base 16) | eight bits |
755 (base 8) | 493 (base 10) | exact integer |
255 (base 10) | FF (base 16) | two hex digits |
Z (base 36) | 35 (base 10) | highest digit |
Exact Base Conversion with BigInt
Validate every digit against the selected source base, multiply the running value by that base, add the next digit, and render the BigInt with the target radix.
function parseBase(text, from, to) {
let value = 0n;
for (const ch of text.toUpperCase()) {
const digit = parseInt(ch, 36);
if (digit >= from) throw new Error("Invalid digit");
value = value * BigInt(from) + BigInt(digit);
}
return value.toString(to).toUpperCase();
}Supported Bases, Signs, Fractions, and Precision
This page converts non-negative whole numbers in bases 2 through 36. It does not interpret signs, fractions, two's-complement widths, or byte order.
A digit must be smaller than the source base: 2 is invalid in binary and G is invalid in hexadecimal. Unsupported input returns no partial result.
Related converters
Continue converting ASCII and Unicode
Choose the converter for the direction and representation you need.