User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

About

Positional numeral systems encode integer values using a fixed set of digits weighted by powers of a radix r. Converting between bases requires decomposing the source representation into its canonical value, then re-encoding under the target radix. Errors in manual conversion compound quickly: a single misidentified digit in base-16 can shift the result by 16k, where k is the digit position. This tool performs exact arbitrary-precision conversion for any integer across bases 2 through 36, using the standard alphanumeric digit set (0 - 9, A - Z). It handles negative values and numbers of arbitrary length without floating-point truncation.

Note: this tool operates on integers only. Fractional base conversion introduces repeating-digit edge cases that require separate treatment. Results are exact; no rounding or approximation is applied.

base converter radix conversion number base binary to decimal hex converter octal converter integer base change

Formulas

An integer N represented in base r with digits dk has the canonical value:

N = nβˆ’1βˆ‘k=0 dk β‹… rk

To convert from base r1 to base r2, first evaluate the sum above to obtain the canonical integer, then extract digits in base r2 via repeated division:

dk = N mod r2 , N ← Nr2

Digits are collected least-significant first and reversed to produce the final representation.

Where: N = integer value, r = radix (base), dk = digit at position k, n = total number of digits.

Reference Data

BaseNameDigits UsedCommon UseExample: 25510
2Binary0-1Digital logic, CPU instructions11111111
3Ternary0-2Balanced ternary computing100110
4Quaternary0-3DNA nucleotide encoding3333
5Quinary0-4Tally systems2010
6Senary0-5Dice arithmetic1103
7Septenary0-6Week-day calculations513
8Octal0-7Unix file permissions, PDP-11377
10Decimal0-9Everyday arithmetic255
12Duodecimal0-9, A - BTime (12 hours), imperial units193
16Hexadecimal0-9, A - FMemory addresses, CSS colorsFF
20Vigesimal0-9, A - JMaya and Aztec numeral systemsCF
32Duotrigesimal0-9, A - VCrockford Base32 encoding7V
36Hexatrigesimal0-9, A - ZURL shorteners, compact IDs73

Frequently Asked Questions

JavaScript Number uses IEEE-754 double-precision floats, which can only represent integers exactly up to 253 βˆ’ 1 (about 9 Γ— 1015). Beyond that, digits are silently lost. BigInt has no upper bound, so a 256-bit hexadecimal value converts without any precision loss.
The standard convention uses Latin letters: A = 10, B = 11, … Z = 35. This covers every base up to 36. Input is case-insensitive; the tool normalises output to uppercase.
The sign is stripped before conversion and reattached to the output. This tool does not use two's complement or sign-magnitude encoding. If you need a two's complement representation, convert the absolute value and apply the complement manually for your target bit width.
No. Fractional base conversion can produce infinitely repeating digit sequences (analogous to 1/3 = 0.333… in decimal). This tool is restricted to integers to guarantee exact, finite results.
Because 16 = 24, each hex digit maps to exactly 4 binary digits, allowing a simple grouping shortcut. Internally, however, this tool always goes through the canonical BigInt intermediate for correctness across all base pairs, and the operation is O(n) on digit count, so it completes in microseconds regardless.
There is no hardcoded limit. The practical limit is your browser's BigInt implementation. Modern browsers handle integers with thousands of digits without issue. If you paste a value exceeding ~50,000 digits, you may notice a brief delay.