Number Base Converter (Bin/Dec/Hex/Oct)
Convert numbers between binary, decimal, hexadecimal and octal. Type a value in any one field and the other three update instantly โ with BigInt precision for numbers of any size.
What this base converter does
A number base (or radix) is simply how many distinct digits you count with before you carry over to the next place. Humans usually count in decimal (base 10, digits 0โ9), but computers work in binary (base 2, just 0 and 1), and programmers lean on hexadecimal (base 16) and octal (base 8) as compact shorthands for those bits. This converter lets you type a value in any of the four and see the equivalent in the others the moment you stop typing.
Type 255 in decimal and you will see ff in hex, 11111111 in binary and 377 in octal โ all the same number, written four ways. You can prefix hex with 0x, binary with 0b and octal with 0o if you like; the tool strips those automatically. Negative numbers work too: a leading - is preserved across every base.
Ordinary JavaScript math loses precision above 2^53. This tool uses BigInt for every calculation, so you can convert a 200-digit decimal or a huge hex hash and every digit stays exact. No rounding, no scientific notation, no surprises.
Where base conversion shows up
- Networking: subnet masks and IP addresses are far easier to reason about in binary. Seeing
192as11000000makes the boundary between network and host bits obvious. - Colours & bytes: a web colour like
#7cc36ais three hex bytes; each byte is 8 binary bits. - Permissions: Unix file modes such as
755are octal, where each digit packs three permission bits. - Debugging: memory addresses, flags and bit masks are almost always shown in hex.
Curious how these bits actually move across a network once they leave your machine? Our guide on how data travels the internet walks through it, and if you are working with addresses specifically, what is an IP address explains the binary underneath every dotted-decimal address.
Need to convert whole IP addresses or work with raw bytes instead of plain numbers? Try the IPv4 to Binary converter or the Hex to Text converter. Everything here โ like every IP Animals tool โ runs entirely in your browser. Nothing you type is uploaded, so it is safe for private values and works even with your connection off.
Frequently asked questions
How big a number can this base converter handle?
There is effectively no upper limit. The tool uses JavaScript BigInt for all arithmetic, so it can convert numbers with hundreds or thousands of digits without losing precision, unlike calculators that rely on 64-bit floating point.
Can I convert negative numbers?
Yes. Put a leading minus sign in front of the value in any field and the sign is preserved across binary, decimal, hexadecimal and octal. The converter works on the number's magnitude and re-applies the sign, so it does not produce two's-complement representations.
Does the tool understand 0x, 0b and 0o prefixes?
Yes. You can optionally prefix hexadecimal with 0x, binary with 0b and octal with 0o. The prefixes are stripped automatically before parsing, and the outputs are shown without prefixes so you can copy the bare digits.
Is my data sent to a server?
No. Every conversion happens locally in your browser using JavaScript. Nothing you type is uploaded, logged or stored anywhere, so the tool works offline and is safe for sensitive values.
Want the theory? Read the guides โ ยท Visit the zoo โ