Convert numbers between binary, octal, decimal, and hexadecimal instantly — all four bases update together as you type.
Binary is a base-2 system using only 0 and 1. It's the fundamental number system used internally by all digital computers.
Hex (base-16) compactly represents binary data, since each hex digit maps exactly to 4 binary bits — common for memory addresses, color codes, and byte values.
Octal (base-8) was historically common in early computing and is still used for Unix file permissions, where each digit maps to 3 binary bits.
This tool is designed for non-negative integer conversions, which covers the vast majority of everyday base conversion needs.
This tool converts a number between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) simultaneously — type a value into any field, and the other three update instantly to show the equivalent value in that base.
Binary is the native language of computer hardware, but raw binary numbers get unwieldy very quickly — a single byte (8 bits) written in binary is 8 characters long, but the same value in hexadecimal is only 2 characters. This is exactly why hex and octal exist as "human-friendly" shorthand for binary: because their bases are powers of 2 (16 = 2⁴, 8 = 2³), converting between them and binary is mechanically simple — you can convert hex to binary or binary to hex digit-by-digit without doing full decimal arithmetic, which isn't true for decimal.
All conversions happen directly in your browser using JavaScript's built-in number parsing — nothing is sent to a server.
Whichever field you type into, the tool first parses that value as an integer in its own base (using JavaScript's parseInt with the appropriate radix) to get a single underlying decimal value. From that one decimal number, it then regenerates the string representation for the other three bases using toString(2), toString(8), and toString(16). This means decimal acts as the common pivot internally — every conversion between, say, binary and hex is technically a binary-to-decimal step followed by a decimal-to-hex step, even though it appears instant and direct to you.
Each field only accepts the digits that are valid for its base: binary accepts just 0 and 1, octal accepts 0 through 7, decimal accepts 0 through 9, and hexadecimal accepts 0-9 plus A-F (case-insensitive). If you type a digit that doesn't belong to the selected base — like an 8 or 9 in the binary field, or a G in the hex field — the tool flags it as invalid rather than silently misinterpreting it, which helps catch a common source of manual conversion errors.
Converting a number between bases by hand involves repeated division (for converting decimal to another base) or repeated multiplication by powers of the base (for converting to decimal) — straightforward in principle but easy to make an arithmetic slip on, especially with larger numbers or hexadecimal's alphabetic digits. This tool removes that risk entirely and also saves the extra step of converting through decimal manually when going between two non-decimal bases, like binary and hex, by handling the whole chain at once.
The decimal number 255 converts to 11111111 in binary (eight 1s, since 255 is one less than 256, which is 2⁸), 377 in octal, and FF in hexadecimal (since each hex digit F represents the maximum value 15, and FF = 15×16 + 15 = 255). This value is commonly recognized because 255 is the maximum value a single byte can hold, which is why FF appears so often in color codes, IP subnet masks (255.255.255.0), and byte-level programming.
Octal was popular in early computing because many early systems used word sizes that were multiples of 3 bits, making octal a natural grouping. As computing standardized around 8-bit bytes (a multiple of 4, not 3), hexadecimal became the more natural fit — two hex digits map exactly onto one byte, while octal doesn't divide evenly into byte boundaries. This is why modern programming, networking, and color systems lean almost entirely on hex, while octal survives mainly in legacy contexts like Unix file permission notation (chmod 755, for example).
Searches that lead people to this tool include "binary to decimal converter," "convert hex to binary online," "decimal to octal calculator," and "base 2 to base 16 converter." Because all four bases update together from a single input, this tool effectively covers all twelve possible conversion directions between the four bases in one place, instead of needing a separate converter for each pair.