Saved
Math & numbers·Basic

Number Base Converter

Convert integers across binary, octal, decimal, and hexadecimal with validation. Fully client-side — no account, uploads, or remote storage.

Added Apr 18, 2026

Input

Result

Enter a value for number to see your result.

How it works

Converts a number from any common base (binary, octal, decimal, hexadecimal) to all other bases simultaneously. Useful for programmers working with bitwise operations, memory addresses, or color codes.

Step by step

  1. 01Enter the number you want to convert and select its source base.
  2. 02The tool first parses the number into its decimal (base 10) value.
  3. 03It then converts that decimal value to binary (base 2), octal (base 8), and hexadecimal (base 16).
  4. 04All four representations are shown at once.

Examples

Decimal 255 to all bases

255 in decimal is 8 ones in binary (0xFF), often seen as the max value of a single byte.

Inputs

Number:
255
From base:
10

Result

Binary (base 2):
11111111
Octal (base 8):
377
Hexadecimal (base 16):
FF

Hex 1A to decimal

0x1A = 1×16 + 10 = 26 in decimal.

Inputs

Number:
1A
From base:
16

Result

Decimal (base 10):
26
Binary (base 2):
11010
Octal (base 8):
32
Note: Hexadecimal letters are case-insensitive — both 'ff' and 'FF' are accepted. For negative numbers, the tool converts the magnitude; negative binary representations (two's complement) are not shown.

Frequently asked questions

How do I convert decimal to binary?

Divide the decimal number by 2 repeatedly, recording the remainder each time. The binary representation is the sequence of remainders read from bottom to top. For example: 13 → remainders 1,0,1,1 → binary 1101.

Why is hexadecimal used in programming?

Hexadecimal (base 16) is compact and maps cleanly to binary — each hex digit represents exactly 4 binary bits. It's widely used for memory addresses, color codes (e.g. #FF5733), and byte values.