Convert integers between any bases from 2 to 36 — binary, octal, decimal, hex and beyond — with arbitrary precision, digit validation and all four common bases at once. Runs entirely in your browser — your numbers never leave this device.
Base 10 result
255
Binary (base 2)
11111111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
Conversion uses arbitrary-precision integer arithmetic, so values far beyond 64 bits convert exactly — no floating-point rounding, ever. Letters are digits too: A is worth 10, B is 11, up to Z at 35, which is why base 36 is the widest base this notation supports.
How it works
Value = d₀×B⁰ + d₁×B¹ + d₂×B² + … reading the digits right to left in base B | Digit values: 0–9 are worth 0–9, A is worth 10, B is 11, … Z is worth 35 — which is why 36 is the widest base this notation supports | A digit is legal only if its value is below the base
Digit values — the alphabet every base is drawn from
Digits
Values
Notes
0–9
0–9
Available in every base from 2 up (subject to the base limit)
A–F
10–15
The extra digits hexadecimal adds — A=10 … F=15
G–Z
16–35
Used by bases 17–36 — G=16, H=17, … Z=35
Base 2 (binary)
Digits 0–1 only
A 2 in binary input is an error, and this tool says so
Base 36
Digits 0–9 and A–Z
The widest base the digit alphabet can spell
A number base is a reading rule: in base B, each position is worth B times the one to its right, and the digits available run from 0 to B − 1. Computers live in base 2 (binary), 8 and 16 (hexadecimal, four bits per digit — which is why hex is the native notation of bytes and colour codes), while people live in base 10. This converter reads an integer in any base from 2 to 36 and writes it in any other, using arbitrary-precision integer arithmetic throughout: there is no floating point anywhere in the path, so a 40-digit decimal converts to hex and back with every digit intact.
Bases above 10 need digits beyond 9, and the convention — printed in the table below — is letters: A is worth 10, continuing to Z at 35. That ceiling is why base 36 is the maximum: it is the widest base the digits-plus-letters alphabet can spell. Input is case-insensitive (ff and FF are the same number), output uses uppercase, and a leading minus sign is honoured. The validation is part of the point: a digit that cannot exist in the chosen base — a 2 in binary — is rejected with an error naming the digit, instead of being silently misread.
The simultaneous readout shows the value in bases 2, 8, 10 and 16 whatever pair you converted between, because that quartet is what low-level work actually moves among — an IP address octet, a colour channel, a file permission and a decimal count are the same integer wearing four notations, and this page's sibling tools (the subnet calculator, the colour converter) are quietly doing base conversion underneath.
Worked examples
A hex byte in decimal
Input
Value = FF, From base 16, To base 10
Working
F is worth 15, so FF means 15 × 16 + 15 = 240 + 15. The simultaneous readout shows the same value as binary 11111111 and octal 377 — eight 1-bits, the largest byte there is.
Result
255 (binary 11111111 · octal 377 · hex FF)
The widest base: letters as digits
Input
Value = ZZZZ, From base 36, To base 10
Working
Z is worth 35, and every position is full: 35 × 36³ + 35 × 36² + 35 × 36 + 35 = 35 × (46,656 + 1,296 + 36 + 1) = 35 × 47,989. Equivalently, ZZZZ is one less than 36⁴.
Result
1679615
Beyond machine integers, exactly
Input
Value = 12345678901234567890, From base 10, To base 16
Working
Twenty digits is more than a 64-bit integer holds and far more than floating point can represent exactly (doubles go inexact past 2^53). Arbitrary-precision division by 16, remainder by remainder, produces the hex with nothing rounded — and converting it back returns the original twenty digits.
Result
AB54A98CEB1F0AD2
Frequently asked questions
Why does conversion stop at base 36?
Because digits run out. Base B needs B distinct digit symbols; the convention uses 0–9 then A–Z, which is 36 symbols — enough for base 36 (digits worth 0–35) and no more. Wider radixes exist in computing (base 64 is everywhere), but they are encodings with their own alphabets and padding rules — the Base64 tool handles that case properly.
Why is '12' an error in base 2?
Because digit 2 does not exist in binary: every digit's value must be below the base, and base 2 offers only 0 and 1. Tools that silently accept it are guessing at what you meant. This converter names the offending digit and the bases' legal range, which usually reveals a wrong base selection — 12 was probably typed as decimal or hex.
Can it convert fractions like 0.1?
No — this converter is for integers, of any length, exactly. Fractional conversion is a different and thornier problem: 0.1 in decimal is an infinitely repeating fraction in binary, so any conversion must choose a precision and say so. Rather than hide rounding in a tool whose selling point is exactness, fractions are out of scope.
How is this different from a programmer's calculator mode?
Range and length. Programmer modes typically stop at bases 2, 8, 10 and 16 and at 64-bit values. Here any base from 2 to 36 converts to any other, the value can be hundreds of digits long (arbitrary precision, no 2^53 ceiling — the 20-digit example converts exactly), and the four everyday bases are always shown together.
Is input case-sensitive? Is there a 0x prefix?
Input letters may be upper or lower case — ff and FF both read as 255 in base 16, and the output is always uppercase. Prefixes like 0x or 0b are not stripped: the x would simply be read as a digit (worth 33) in bases that allow it, or rejected in base 16. Select the base explicitly and paste the bare digits.