Number Base Converter
AvailableConvert integers between binary, octal, decimal, hexadecimal and any base from 2 to 36, with exact big-number arithmetic and grouped binary and hex output.
Convert a number
Whole numbers, optionally negative. 0x, 0b and 0o prefixes are recognized (with a fixed base, only when they are not valid digits of that base); spaces, _ and ' are ignored.
Result
How it works
A number written in base b uses digits 0 to b−1 (letters A–Z for 10–35), and each position is worth b times the one to its right. The converter reads the digits into an exact arbitrary-size integer (JavaScript BigInt) and writes it out in every target base, so even very long numbers convert without precision loss.
Positional notation
In base b, each digit is multiplied by a power of b: 2F₁₆ = 2×16¹ + 15×16⁰ = 47. Bases above 10 use letters for digits 10–35
(A = 10 … Z = 35). Binary is grouped in 4-bit nibbles and hex in byte pairs for readability; one hex digit is exactly four bits.
Learn more
What is Number Base Converter?How it works, how to read the results, troubleshooting and FAQs. Complete guide →Frequently asked questions
What do the 0x, 0b and 0o prefixes mean?
They mark the base in source code: 0x for hexadecimal (base 16), 0b for binary (base 2) and 0o for octal (base 8). The converter accepts them in the input; with a fixed base selected, a prefix that is itself valid digits (such as 0b1 in base 16) is read as digits.
Can it convert fractions?
No — it converts whole numbers (integers), including negative ones. Fractions often have no exact representation in another base.
How are negative numbers shown?
With a minus sign in every base. For negative values that fit, the two’s-complement bit patterns used by computers (8, 16, 32 and 64 bits) are shown as well.