Converters4 min read

Number Base Converter: Binary, Hex, Decimal, Octal Online

Convert integers between number bases 2-36 instantly. Convert binary to hex, decimal to octal, and more.

Try the free online tool mentioned in this guide:Number Base Converter

Understanding number bases

Every number can be represented in different bases (radix). Humans use base 10 (decimal), but computers use base 2 (binary), base 16 (hexadecimal), and sometimes base 8 (octal).

The same value represented in different bases: - Decimal (base 10): 255 - Binary (base 2): 11111111 - Octal (base 8): 377 - Hexadecimal (base 16): FF

Base conversion is essential in low-level programming (bit manipulation), color codes (hex), IP addresses (decimal), and cryptography (hex for binary data).

Common number bases

Binary (base 2) — Digits 0–1. Used by computers at the hardware level.

Octal (base 8) — Digits 0–7. Historical significance in Unix file permissions, but less common today.

Decimal (base 10) — Digits 0–9. Human default.

Hexadecimal (base 16) — Digits 0–9, A–F. Compact representation of binary data. Used in colors (#FF5733), memory addresses, and cryptography.

Any base 2–36 — MyDevTools supports arbitrary bases using 0–9 and A–Z.

text
// Decimal to Hex (common in color codes)
255 (decimal) = FF (hex)

// Binary representation
42 (decimal) = 101010 (binary)

// Octal (Unix file permissions)
755 (octal) = 493 (decimal) = rwxr-xr-x in Unix

Practical use cases

Hex color codes — #FF5733 breaks down as FF (red), 57 (green), 33 (blue) in hexadecimal.

Unicode and character codes — Characters are stored as numbers; hex is compact for display.

Bitwise operations — Convert to binary to understand which bits are set.

Network subnets — IP addresses and CIDR notation involve binary and decimal conversions.

File permissions — Unix chmod 755 is octal; 7 = read+write+execute (binary 111), 5 = read+execute (binary 101).

Frequently asked questions

Why do programmers use hexadecimal?

Hex is compact: 8 binary digits (11111111) compress into 2 hex digits (FF). This makes large binary numbers readable and writable.

How do I convert binary to hex quickly?

Group binary digits in sets of 4 (right to left), then convert each group to a hex digit: 1101 1010 → DA.

Can I convert negative numbers?

Yes. The converter handles negative numbers using standard two's complement representation for binary.

Try Number Base Converter for free

Convert integers between number bases 2 through 36 with optional 0x/0b/0o prefixes. Runs entirely in your browser. No install, no account required to try it.