Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Enter a number in any base, see all 4 representations simultaneously with step-by-step conversion math. Handles large integers up to thousands of digits.

🟢📖 About Number Bases

Binary (Base 2)Digits 0-1. The native language of digital circuits. Each bit represents a power of 2. Used in subnet masks, bit flags, and low-level programming.
Octal (Base 8)Digits 0-7. Historically used in Unix file permissions (chmod 755) and early computing. Each octal digit maps to exactly 3 bits.
Decimal (Base 10)Digits 0-9. The human-default system. Ten fingers, ten digits. Used everywhere in daily life but awkward for computer arithmetic.
Hexadecimal (Base 16)Digits 0-9, A-F. The most common base in programming: memory addresses, color codes (#FF5733), MAC addresses, and binary data representation. Each hex digit represents 4 bits (a nibble).

Why hex? Binary is verbose (an IPv4 address in binary is 32 digits). Hex compresses 4 bits per digit —11111111 becomes FF. This is why hex dumps, hex editors, and hex color codes exist.

Large integers: JavaScript's BigInt type handles arbitrary-precision integers, making this converter accurate for numbers with hundreds of digits. Unlike floating-point (Number), BigInt has zero precision loss.

See also: IPv4 to Binary / Bitmask · Color Converter