GetHubApps Logo
GetHubApps
💻
ConvertersFree · In-Browser

Number Base Converter

Convert between binary, octal, decimal, hex and any base from 2 to 36.

Binary (base 2)

0b1111 1111

Octal (base 8)

0o377

Decimal (base 10)

255

Hexadecimal (base 16)

0xff

Bit length

8 bits

Fits in

1 byte

Values are converted with arbitrary-precision integers, so numbers far beyond 64 bits stay exact. Prefixes like 0x, 0b and 0o in your input are ignored.

Convert numbers between binary, octal, decimal, hexadecimal, or any custom base from 2 to 36 — a routine task in programming, networking, and computer science courses.

Enter a value in one base and every other base updates simultaneously, making it easy to spot-check conversions or explore how the same value looks across different number systems.

The same value across common bases

DecimalBinaryOctalHex
81000108
15111117F
16100002010
64100000010040
25511111111377FF
256100000000400100
1024100000000002000400

255 (FF, eight ones in binary) is the largest value in a single byte, which is why it appears constantly in colour codes, IP addresses and permission masks.

Why hex is the programmer's shorthand

One hex digit maps to exactly four binary digits, so any byte is exactly two hex characters. That makes conversion between the two purely mechanical — you can read hex off a binary string in groups of four without any arithmetic.

The same property is why colour codes are hex: #FF8800 is three bytes, one each for red, green and blue, and each pair reads directly as a 0–255 intensity. Octal has the same relationship to groups of three bits, which is why Unix file permissions (rwx, three bits per group) are written in octal.

Converting by hand

  1. Decimal to any base: divide repeatedly by the target base, writing down each remainder, then read the remainders bottom to top.
  2. Any base to decimal: multiply each digit by the base raised to its position (counting from zero on the right) and sum.
  3. Binary to hex: group the bits in fours from the right, padding the leftmost group with zeros, and convert each group.
  4. Hex to binary: expand each hex digit to its four-bit pattern.
  5. Check your work by converting back — the round trip should return the original value.

Frequently asked questions

Why does hexadecimal use letters A–F?
Hex is base 16, which needs 16 distinct digits. After 0–9, letters A through F represent values 10 through 15.
What's the largest base this supports?
Base 36, which uses digits 0–9 followed by letters A–Z, the practical maximum for single-character-per-digit notation.
Can I convert directly between two non-decimal bases, like binary to hex?
Yes — enter the value in either field and every base, including any custom one you've set, updates at once.
Why is 255 such a common number in computing?
It's the largest value that fits in eight bits, and eight bits is one byte. That's why RGB channels, IPv4 octets and many limits all stop at 255.
What does the 0x or 0b prefix mean?
They're notation conventions telling a compiler or reader which base follows: 0x for hexadecimal, 0b for binary, and a leading 0 for octal in C-style languages.

Related tools