Skip to main content

    Number Base Converter

    Convert numbers between decimal, binary, octal, and hexadecimal. Instant results as you type.

    No signup. 100% private. Processed in your browser.

    Number Bases: How Computers Count

    Humans count in base 10 (decimal) because we have 10 fingers. Computers count in base 2 (binary) because transistors have two states: on and off. But binary is tedious for humans — 11111111 is easier to read as FF (hexadecimal, base 16) or 255 (decimal).

    Hexadecimal (base 16) is everywhere in computing: colour codes (#FF5733), memory addresses, MAC addresses, and Unicode code points. Octal (base 8) appears in Unix file permissions (chmod 755). Binary shows up when working with bitwise operations, network masks, and low-level protocols.

    This converter handles any base from 2 to 36. Enter a number in one base, see it instantly in all others. It handles large numbers, negative values, and validates input for the selected base.

    Common Number Bases

    BaseNameDigits UsedWhere You See It
    2Binary0, 1Low-level computing, network masks, flags
    8Octal0–7Unix file permissions (chmod 755)
    10Decimal0–9Everyday numbers, most user interfaces
    16Hexadecimal0–9, A–FColours (#FF5733), addresses, UUIDs
    32Base32A–Z, 2–7TOTP secrets (2FA authenticator apps)
    36Base360–9, A–ZURL shorteners, compact IDs

    What this means for you: Most developers only need decimal, hexadecimal, and binary. Octal matters for Unix permissions. Base36 is useful for short URL-safe identifiers (toString(36) in JavaScript).

    Practical Base Conversion Examples

    DecimalBinaryHexOctalContext
    25511111111FF377Max byte value, RGB channel max
    4201101001001A4644Unix file permission (rw-r--r--)
    4931111011011ED755Unix file permission (rwxr-xr-x)
    655351111111111111111FFFF177777Max 16-bit unsigned integer
    16777215111111111111111111111111FFFFFF77777777White colour (#FFFFFF)

    Quick Conversion Tricks

    Hex → Binary (by hand)

    Each hex digit maps to exactly 4 binary digits. F = 1111, A = 1010, 0 = 0000. So FF = 11111111, and A3 = 10100011. This is why hex and binary are so closely related.

    Powers of 2 to memorise

    2⁸ = 256, 2¹⁰ = 1024 (1K), 2¹⁶ = 65536, 2³² = ~4.3 billion. These come up constantly in byte limits, colour depth, integer ranges, and memory addressing.

    JavaScript shortcuts

    0xFF (hex), 0b11111111 (binary), 0o377 (octal) — all equal 255 in JS. Use parseInt("FF", 16) and (255).toString(16) for conversions in code.

    Subnet masks

    255.255.255.0 in binary is 11111111.11111111.11111111.00000000 — that's /24 in CIDR notation. Understanding binary makes network masks intuitive.

    Related Tools

    How to use this tool

    1

    Enter a number in the input field

    2

    Select the base your number is in (decimal, binary, octal, or hex)

    3

    See instant conversions to all four bases

    Common uses

    • Converting hex colour codes to RGB decimal values
    • Understanding Unix file permissions in octal
    • Working with binary subnet masks and IP addresses
    • Debugging memory addresses and byte values in hex

    Share this tool

    Frequently Asked Questions