Number Base Converter
A number base converter turns an integer written in one radix into its exact equivalent in another, so a value typed in decimal appears instantly in binary, octal, and hexadecimal, and a hex colour or status code can be read back as a plain decimal number. Picking a wrong digit for the source base is the usual mistake, which is why this tool validates every character against the base you choose before it converts anything.
It is free and runs entirely in your browser. The math uses JavaScript BigInt, so even very large integers convert exactly with no floating-point rounding, and nothing you paste is sent anywhere.
- for negatives.
🔒 Private: everything runs in your browser. Nothing you paste is uploaded.
How to use the number base converter
Type a number, pick the base it is written in, and read the binary, octal, decimal, and hexadecimal versions below. Choose the custom option to convert from any base between 2 and 36.
Pick the source base before you type the digits
Every conversion starts from a base, and the digits that are legal depend on it. Base 2 allows only 0 and 1, base 8 allows 0 through 7, and base 16 adds A through F on top of the ten decimal digits. Set the from-base first, then enter the value, and the tool checks each character against that base. If you paste a hex string while the source is still set to decimal, the F triggers an error pill pointing at the offending position rather than returning a silently wrong number.
Read large numbers exactly with BigInt, not floating point
JavaScript’s ordinary numbers lose precision above roughly nine quadrillion, so a long hexadecimal hash or a 64-bit identifier converted with naive math comes back subtly wrong. This converter parses the input into a BigInt, an arbitrary-precision integer type, then renders each target base from that exact value. The result is reliable for memory addresses, file permission masks, large IDs, and any integer too big for a standard double, with a bit-length and digit-count line confirming the magnitude it actually computed.
Use custom bases from 2 to 36 for encoding work
Standard programming sticks to bases 2, 8, 10, and 16, but base 36 packs numbers tightly using every digit and letter, which is handy for short URL slugs, ticket codes, and compact identifiers. Choose the custom option and set any base from 2 to 36 as the source; the four standard conversions still appear, plus a highlighted card showing the number in that custom base. Because the same digit alphabet and BigInt parser drive every base, the round trip stays exact in both directions.
Number base converter frequently asked questions
Q1What is a number base, and why convert between them?
A number base, or radix, is how many distinct digits a positional system uses: base 10 uses ten, binary uses two, hexadecimal uses sixteen. Computers store everything in binary, programmers read it more easily as hex, and humans think in decimal. Converting between bases lets each audience read the same value in the form that suits the task at hand.
Q2Can it convert very large numbers without losing precision?
Yes. The tool parses your input into a BigInt, an arbitrary-precision integer, instead of a floating-point number. That means values far beyond the usual safe-integer limit, such as 64-bit identifiers or long hexadecimal hashes, convert exactly in every base with no rounding. The bit-length line under the results confirms the precise magnitude that was computed.
Q3Why am I getting an invalid digit error?
The error means a character in your input is not legal for the source base you selected. Base 2 accepts only 0 and 1, base 8 accepts 0 to 7, and decimal rejects letters. The message names the offending character and its position, so check that the from-base matches the number you actually pasted before converting again.
Q4Does this converter send my numbers to a server?
No. Every conversion runs locally in your browser with client-side JavaScript, and nothing you type or paste is uploaded, logged, or stored. The page works offline once it has loaded, so it is safe to use for internal identifiers, keys, or any value you would rather not transmit over a network.
Q5What is the difference between binary, octal, and hexadecimal?
All three are shorthand for binary, which is hard to read in long strings. Octal groups bits in threes using digits 0 to 7, while hexadecimal groups them in fours using 0 to 9 then A to F, making each hex digit equal to exactly four binary bits. Hexadecimal is the most common today for colours, memory addresses, and byte values.
