Binary/Hex/Decimal Converter

Convert numbers between binary, hexadecimal, decimal, and octal with real-time conversion and step-by-step explanations.

Enter a number in any base and instantly see the equivalent values in all other number systems. This tool provides bit visualisation, ASCII character display, and detailed conversion steps.

All processing happens in your browser - your data is never sent to our servers.

Input
Valid characters: 0-9
Common Values Reference
Decimal Binary Octal Hexadecimal Description
0000Zero
1111One
21022Two
711177Max 3-bit value
81000108Octal base
10101012ADecimal base
15111117FMax 4-bit value (nibble)
16100002010Hex base
321000004020Space (ASCII)
64100000010040@ (ASCII)
12711111111777FMax 7-bit value (ASCII)
12810000000200802^7
25511111111377FFMax 8-bit value (byte)
2561000000004001002^8
10241000000000020004001 Kilobyte
655351111111111111111177777FFFFMax 16-bit value
How to Use This Converter
  1. Select the input base - Choose the number system of the value you want to convert (Binary, Octal, Decimal, or Hexadecimal).
  2. Enter your number - Type the number in the input field. The converter validates your input based on the selected base.
  3. View instant results - All conversions appear automatically as you type.
  4. Copy results - Click the copy button next to any result to copy it to your clipboard.
  5. Explore the details - View the bit visualisation, ASCII character (if applicable), and step-by-step conversion explanation.
Understanding Number Bases
Binary (Base 2)

Uses only 0 and 1. The foundation of all digital computing. Each digit represents a power of 2.

Octal (Base 8)

Uses digits 0-7. Historically used in computing as a compact binary representation (3 bits per digit).

Decimal (Base 10)

Uses digits 0-9. The standard number system used in everyday life.

Hexadecimal (Base 16)

Uses 0-9 and A-F. Widely used in programming for memory addresses, colour codes, and byte values.

Frequently Asked Questions

A number base, or radix, is the number of unique digits used to represent numbers in a positional numeral system. Decimal uses base 10 (digits 0-9), binary uses base 2 (digits 0-1), octal uses base 8 (digits 0-7), and hexadecimal uses base 16 (digits 0-9 and A-F).

Hexadecimal is popular in programming because it provides a compact way to represent binary data. Each hexadecimal digit represents exactly 4 binary bits, making it easy to convert between hex and binary. For example, the hex value FF equals binary 11111111, which is much easier to read than writing out all 8 bits.

To convert binary to decimal, multiply each binary digit by its positional value (powers of 2) and sum the results. For example, binary 1011 = (1×8) + (0×4) + (1×2) + (1×1) = 8 + 0 + 2 + 1 = 11 in decimal.

Unsigned binary numbers represent only positive values, using all bits for the magnitude. Signed binary numbers use one bit (usually the leftmost) to indicate positive or negative values. For example, in an 8-bit unsigned system, values range from 0 to 255, while in a signed system using two's complement, values range from -128 to 127.

Computers use binary because electronic circuits have two stable states: on (1) and off (0). This makes binary the natural choice for digital electronics. All data in computers, including text, images, and programs, is ultimately represented as sequences of binary digits (bits).
Related Tools
Quick Reference
Hex Digits
A = 10B = 11
C = 12D = 13
E = 14F = 15
Powers of 2
2^4 = 162^8 = 256
2^10 = 10242^16 = 65536
Common Prefixes
  • 0b - Binary (e.g., 0b1010)
  • 0o - Octal (e.g., 0o12)
  • 0x - Hex (e.g., 0xFF)
Hex in Colour Codes

Hexadecimal is commonly used in web colour codes:

#FF0000 Red (255, 0, 0)
#00FF00 Green (0, 255, 0)
#0000FF Blue (0, 0, 255)
#FFFFFF White (255, 255, 255)