Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36, with bit-width and two's complement views.
Result
Representations
- Binary (byte-grouped)
- 11111111
- Base 32
- 7V
- Base 36
- 73
- Fits in 32 bits
- yes
- Bytes
- 1
About Number Base Converter
Base conversion turns up constantly in networking: hex in packet dumps, binary when reasoning about masks, octal in file permissions. This converts between all of them and shows how many bits the value actually needs.
Where each base shows up
Hexadecimal dominates anything byte-oriented because one hex digit is exactly four bits: MAC addresses, IPv6 groups, packet dumps and MPLS labels are all easier to read in hex than in decimal. Octal survives almost exclusively in Unix file permissions, where each digit maps neatly onto a read/write/execute triplet. Binary is where masks and flag fields become obvious — a subnet mask or a TCP flags byte tells you nothing in decimal and everything in binary. Base 32 and base 36 turn up in short identifiers and license keys because they avoid ambiguous characters while staying case-insensitive.
Two's complement in one paragraph
Signed integers store negatives by inverting the bits and adding one, so the top bit indicates sign. In a 32-bit signed field, 0xC0A80101 reads as -1062731519 rather than 3232235777 - which is exactly why IP addresses stored in signed database columns come back negative.
Common use cases
- Reading a hex value out of a packet capture.
- Checking whether a value fits a fixed-width protocol field.
- Converting a bitmask into readable binary.
Edge cases and gotchas
- JavaScript bitwise operators work on 32 bits; values above 2^53 lose precision without BigInt.