Reconnecting… Connection lost. Reload Session expired. Reload

Number Base Converter

Enter a number in any base and get the equivalent in binary (base 2), octal (base 8), decimal (base 10) and hex (base 16).

By Pankaj Kumar · DevToolsHub· Last updated Jun 2026
Input Section
Input value
From base
Output Section
Binary (base 2)

11111111

Octal (base 8)

377

Decimal (base 10)

255

Hex (base 16)

FF

What is number base conversion?

Number base conversion translates a value from one numeral system to another. All computers store data as binary (base 2), but developers interact with numbers in decimal (base 10) for everyday values, hexadecimal (base 16) for memory addresses and colour codes, and octal (base 8) for Unix file permissions. Understanding base conversion means you can read raw memory dumps, manipulate bitfields, and work with system-level values without confusion.

The four number bases developers use

  • Binary (base 2): Only the digits 0 and 1. Every value in a computer is ultimately stored as binary bits. Used in bitwise operations (&, |, ^, <<, >>), network subnet masks, and hardware register maps. The decimal value 255 is 11111111 in binary — eight bits all set to 1, which is why a byte maximum is 255.
  • Octal (base 8): Digits 0–7. Each octal digit represents exactly three binary bits, making it a compact way to express binary values. Used almost exclusively in Unix/Linux file permissions: chmod 755 means rwxr-xr-x, where 7 = 111 (read+write+execute), 5 = 101 (read+execute), in binary.
  • Decimal (base 10): Digits 0–9. The base humans use naturally. Port numbers, IP address octets, array indices, and most user-visible numbers are decimal.
  • Hexadecimal (base 16): Digits 0–9 and letters A–F. Each hex digit represents exactly four binary bits (a nibble), making hex a concise way to express binary data. Memory addresses, SHA hashes, RGB colour values (#FF5733), UUID values, and hardware identifiers are all written in hex.

Hex colour codes explained

CSS hex colours like #FF5733 are three pairs of hex digits representing the red, green, and blue channels: FF = 255 red, 57 = 87 green, 33 = 51 blue. Each channel is one byte (0–255 in decimal, 00–FF in hex). The shorthand #F53 expands to #FF5533 by doubling each digit. Converting between hex and decimal directly is how you calculate the RGB equivalent of a hex colour code.

How to use this tool

  1. Enter a number in the input field.
  2. Select the base of your input number (binary, octal, decimal, or hex) using the base buttons.
  3. The conversions to all other bases update automatically.
  4. Copy the result you need using the copy button next to each value.

Bitwise operations and binary

Bitwise operations work directly on individual binary bits and are common in systems programming, network code, and performance-sensitive algorithms. Understanding binary representation makes these operations intuitive: 255 & 15 in decimal is 11111111 & 00001111 = 00001111 = 15 — it masks the lower four bits. 1 << 4 is binary 1 shifted four places left, giving 10000 = 16 in decimal. Converting your values to binary before applying bitwise operations makes the result predictable and easy to verify.

FAQ
What number range is supported?

The tool handles signed 64-bit integers (up to 9,223,372,036,854,775,807).

How do I enter a hex number?

Select Base 16 and type the hex digits without a 0x prefix — e.g. FF for 255.

What is hexadecimal used for in web development?

Hex is used for color codes (#FF6600), memory addresses, and character encoding values. It compresses binary to a shorter, human-readable form.

Why does computer science use binary?

Computers work in binary because transistors have two states: on (1) and off (0). All data — text, images, programs — is ultimately stored as binary.

How do I convert a binary number manually?

Multiply each binary digit by 2 raised to its position power. For 1011: (1×8) + (0×4) + (1×2) + (1×1) = 11 in decimal.

What is the largest hex value for a byte?

A byte is 8 bits. The maximum value is 11111111 in binary, 255 in decimal, FF in hexadecimal, and 377 in octal.