Number Base Converter — Binary, Octal, Decimal, Hex
Convert numbers between binary, octal, decimal, and hexadecimal instantly. Free number base converter online, no signup needed.
Three steps to get started
Select input base
Choose Binary, Octal, Decimal, or Hexadecimal as the base of the number you will enter.
Enter a number
Type your number using digits valid for the selected base. Binary accepts 0 and 1; hex accepts 0–9 and A–F.
Copy any result
All four base representations appear instantly. Click Copy next to any result to use it in your code.
Number bases in computing
Every number can be expressed in any base — the value is the same, only the representation differs. Computers operate entirely in binary (base 2) at the hardware level, but we interact with numbers in decimal for everyday math, hexadecimal for memory addresses and color codes, and octal for Unix permissions.
Why hexadecimal dominates programming
Hex is popular because each hex digit maps perfectly to 4 bits, making it a compact way to write binary data. A 32-bit integer that takes 32 binary digits can be written with just 8 hex digits. This is why:
- Memory addresses look like
0x7fff5fbff8b0 - Colors in HTML/CSS are written as
#1A5CFF - SHA-256 hashes are 64 hex characters (256 bits)
- UUID/GUIDs use hex digits separated by hyphens
- Byte values in debugging are shown as two hex digits each
Quick reference
Decimal 255 = Binary 11111111 = Octal 377 = Hex FF. Decimal 16 = Binary 10000 = Octal 20 = Hex 10. Decimal 1024 = Binary 10000000000 = Octal 2000 = Hex 400.
All conversions happen in your browser. No data is ever sent to a server.