Number Base Converter
Convert an integer between binary, octal, decimal, hexadecimal and any base from 2 to 36, live. Arbitrary-size integers supported.
Underscores and spaces are ignored, so 1111_1111 is fine. Arbitrary-size integers are supported (via BigInt); fractions are not.
Base 32: 7v
Base 36: 73
Bits: 8
Positional number systems, from binary to base 36
Every base writes a number as a sum of digits multiplied by powers of the base. In base 10 the string "255" means 2×10² + 5×10¹ + 5×10⁰. In base 16 the same value is "ff": 15×16¹ + 15×16⁰. Converting between bases does not change the number, only how it is written. This tool reads your input in whichever base you pick and re-expresses it in binary, octal, decimal, hexadecimal, and bases 32 and 36.
Binary and hexadecimal dominate computing because they line up with hardware. One byte is eight bits, and eight bits map exactly to two hex digits, so hex is a dense, readable stand-in for binary: 0xFF is 1111 1111. Octal groups bits in threes and survives mainly in Unix file permissions (chmod 755). Decimal is for humans; the machine never uses it internally.
Digits beyond 9 are written as letters. Base 16 uses a–f for the values 10–15; base 36 continues through the whole alphabet to represent 10–35, which is why short base-36 strings can encode large numbers compactly (used in URL slugs and IDs). This converter accepts 0b, 0o and 0x prefixes when they match the chosen base, and ignores underscores and spaces so grouped input like 1111_0000 works.
The conversion uses arbitrary-precision integers (BigInt), so there is no 32-bit, 64-bit or 2^53 limit — paste a hundred-digit number if you need to. It handles a leading minus sign but does not render two’s-complement bit patterns; for that you fix a word size (8, 16, 32 bits) and compute the complement separately. Fractional values are out of scope.
Everything is computed in your browser. Nothing is sent anywhere and the tool works offline.
Key formulas (reference)
value = Σ digitᵢ × baseⁱ (i from 0 at the rightmost digit) parse: acc = acc × base + digitValue(ch) for each digit render: value.toString(targetBase) // BigInt, bases 2–36 bit length = value.toString(2).length
Related tools
These free tools pair well with this page — open them in a new tab to finish your workflow.
Frequently Asked Questions
Which bases are supported?
Any base from 2 to 36. Binary (2), octal (8), decimal (10) and hexadecimal (16) are shown as dedicated rows; base 32 and base 36 are also displayed. Digits above 9 use the letters a–z, so base 16 uses a–f and base 36 uses a–z.
How large a number can it handle?
Arbitrarily large integers. The conversion uses JavaScript’s BigInt, so there is no 2^53 precision limit and no 32- or 64-bit ceiling. Very long inputs are fine.
Can it convert fractions or decimals?
No. This is an integer converter. Fractional values in non-decimal bases (like 0.101 in binary) are a separate problem with rounding subtleties and are not supported here.
Does it accept prefixes like 0x or 0b?
Yes, when they match the selected base. With base 16 selected, "0xFF" and "FF" are both read as 255; with base 2, "0b1010" and "1010" both give 10. Underscores and spaces are ignored, so "1111_0000" works.
How are negative numbers handled?
A leading minus sign is respected and carried through to every base — for example −255 shows as "-ff" in hex. This tool does not display two’s-complement bit patterns; for that you would fix a word size (8, 16, 32 bits) and compute the complement separately.
Why does hexadecimal use letters?
Each hex digit represents four bits, and four bits have sixteen possible values (0–15). There are only ten digit characters, so the values 10 through 15 borrow the letters a through f. This makes hex a compact, byte-aligned way to write binary.
What is the "bits" figure?
It is the number of binary digits in the value — the position of the highest set bit plus one. It tells you the minimum word size needed to store the number: a value needing 12 bits fits in a 16-bit integer but not an 8-bit one.