Number Base Converter

    Convert between binary, octal, decimal, and hexadecimal

    0bBinary (Base 2)
    0oOctal (Base 8)
    Decimal (Base 10)
    0xHexadecimal (Base 16)

    Real-time Conversion

    See all bases update as you type

    100% Private

    Runs entirely in your browser

    No Signup

    Free tool, no registration required

    Number Base Conversion: Binary, Octal, Decimal, and Hexadecimal

    Computers store all data as binary — sequences of 0s and 1s. But working with binary directly is impractical for humans: a 32-bit integer requires 32 digits in binary, only 10 in decimal, and just 8 in hexadecimal. Number base conversion is the mathematical process of expressing the same quantity in a different positional numeral system. The four bases you'll encounter most in computing are binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16).

    Why Hexadecimal?

    Hexadecimal is the dominant base in computing because each hex digit maps exactly to 4 binary bits. This makes hex a compact, human-readable representation of binary data. A byte (8 bits) is always exactly 2 hex digits — FF = 255. Memory addresses, color values (#FF5733), file magic numbers, and CPU registers are all expressed in hex. You'll encounter it constantly when debugging low-level code, reading hex dumps, or working with cryptographic hashes and UUIDs.

    Binary and Bitwise Operations

    Binary representation is essential for understanding bitwise operations: AND, OR, XOR, NOT, and bit shifts. These operations work directly on the binary digits of a number and are used heavily in systems programming, network masks, permissions (Unix file modes like chmod 755), and performance-critical code. Seeing a number in binary immediately shows which bits are set, making it easy to reason about masks and flags.

    How to Use This Tool

    Enter a number in any base — decimal, binary (prefix 0b), octal (prefix 0o), or hexadecimal (prefix 0x or with letters A–F) — and the converter instantly shows the equivalent value in all four bases. Negative numbers and floating-point values are handled for decimal input.

    Frequently Asked Questions