Convert between Binary, Octal, Decimal, and Hexadecimal in real-time. Edit any field to update all others.
Number Base Converter converts integers between the four numeral systems most commonly used in programming: decimal (base 10), hexadecimal (base 16), binary (base 2), and octal (base 8). Type in any of the four fields and the other three update instantly, with color-coded inputs to make each base immediately recognizable.
A visual bit representation lets you see exactly which bits are set at 8, 16, or 32-bit widths, and a quick-reference grid of common programming values (0xFF, max uint16, 1 KB, etc.) lets you load them with a single click. Everything runs in the browser with no network requests.
11001010) to its hex representation for writing packet inspection or protocol parsing code.Each hex digit maps exactly to four binary bits (a nibble), making hex a compact and human-readable shorthand for binary data. Memory addresses, color codes, and byte values are much shorter in hex — for example, the 8-bit value 11111111 is simply FF in hex versus 255 in decimal. This tight correspondence makes hex the standard in assembly, networking, and low-level debugging.
0xFF is 255 in decimal — the largest value that fits in 8 bits where all bits are set to 1 (11111111 in binary). A byte has 8 bits, each of which can hold 0 or 1, giving 2^8 = 256 possible values (0 through 255). You see this limit constantly in programming: the maximum value for a single color channel in RGB, the uint8 type boundary, or a network subnet mask segment.
Octal (base 8) is most commonly encountered in Unix/Linux file permission bits. The permission string rwxr-xr-x maps to the octal value 755 (decimal 493), where each octal digit represents three permission bits for owner, group, and others respectively. When you run chmod 755 file.sh in a terminal, you are passing an octal number to set those exact bit patterns.