belun.app

Number Base Converter — Binary, Octal, Decimal, Hex Online

Type a value in any field — the other three update instantly.

Type any value into the binary, octal, decimal, or hexadecimal field — all other representations update instantly as you type. Works entirely in your browser with no server involved. Useful for programming, debugging bit fields, reading memory addresses, or understanding how computers represent numbers.

Decimal, binary, octal and hex from 0 to 15

The sixteen hex digits and their 4-bit codes: any binary number converts to hex by replacing every group of four bits with the digit from this table.

Decimal Binary (4 bits) Octal Hex
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F

Octal digits in chmod permissions

Unix file modes are the main place octal survives. Each octal digit covers three bits, one each for read, write and execute. In chmod 755 the owner gets 7 while group and others get 5.

Octal Binary Permission
7 111 read, write, execute
5 101 read and execute, no write
4 100 read only

Converting between number bases by hand

To read binary 1101, weight each bit from the right by 1, 2, 4 and 8, then add: 8 + 4 + 0 + 1 = 13. To go from decimal to hex, divide by 16 repeatedly and write the remainders in reverse. 13 ÷ 16 leaves remainder 13, which is the hex digit D. A byte spans 0 to 255, so a CSS color like #FF8800 splits into red 255, green 136 and blue 0. A SHA-256 hash prints as 64 hex characters, one per four bits.

Frequently asked questions

What numbers can this tool handle?
Whole numbers from 0 to 2^64 − 1 (18,446,744,073,709,551,615 in decimal, the full unsigned 64-bit range), computed exactly as big integers. A longer value gets a too-large error instead of a rounded result.
Can I convert negative numbers?
No. A minus sign gives an error, because the tool converts only non-negative whole numbers. Signed values in code are stored as two's complement, which depends on the word size (8, 16 or 32 bits).
What does the 0x prefix in hex literals mean?
The 0x prefix is a convention from C and the languages that descend from it: the following digits are hexadecimal, so 0xFF means 255. In the same way 0b marks binary and 0o octal. The converter accepts numbers with or without these prefixes and skips spaces and underscores between digits, so 1101 0011 and 1_000 are read correctly.

Related tools