Free Online Number Base Converter
π Runs in your browser β nothing is sent to a serverA universal number base converter for binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Type a value on either side, pick the bases, and the result updates instantly. Useful for programming, digital electronics, Unix file permissions, color codes and debugging memory addresses. Long values up to arbitrary precision are handled with BigInt, so 64-bit integers round-trip exactly. Everything runs in your browser β no input ever leaves the page.
Allowed: 0β9
Allowed: 0β9, aβf
Supported bases: Binary (2), Octal (8), Decimal (10), Hexadecimal (16). Negative integers are accepted; fractional values are not.
Binary, Octal, Decimal, Hexadecimal β reference
The same integer value rendered in all four numeral systems.
| Binary (2) | Octal (8) | Decimal (10) | Hexadecimal (16) |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 10 | 2 | 2 | 2 |
| 101 | 5 | 5 | 5 |
| 1000 | 10 | 8 | 8 |
| 1010 | 12 | 10 | a |
| 1111 | 17 | 15 | f |
| 10000 | 20 | 16 | 10 |
| 100000 | 40 | 32 | 20 |
| 1000000 | 100 | 64 | 40 |
| 1100100 | 144 | 100 | 64 |
| 10000000 | 200 | 128 | 80 |
| 11111111 | 377 | 255 | ff |
| 100000000 | 400 | 256 | 100 |
| 10000000000 | 2000 | 1024 | 400 |
Why programmers use hexadecimal
Hexadecimal is the natural shorthand for binary data because each hex digit maps to exactly four binary digits (one nibble). Two hex digits encode one byte, eight hex digits encode a 32-bit word, sixteen hex digits encode a 64-bit word. That tight mapping is why memory addresses, MAC addresses, MD5 and SHA hashes, byte sequences in hex dumps and HTML/CSS color codes such as #ff8800 are all written in hex. Converting #ff8800 from hex gives the decimal triplet (255, 136, 0), the RGB intensities of each channel.
Octal in Unix file permissions
Octal survives in modern computing largely because of Unix file permissions. Each chmod digit is a 3-bit permission mask: 4 = read, 2 = write, 1 = execute, summed per role (owner, group, others). chmod 755 means owner has 7 = rwx, while group and others have 5 = rx β the typical permission set for an executable. chmod 644 means owner rw, others r β typical for a regular file. Decoding a chmod number is easy once you read it as three octal digits, each a sum of 4-2-1 binary flags.
How the conversion works under the hood
Every value is parsed into a canonical integer (a JavaScript BigInt for arbitrary length, falling back to a fast path for small numbers) and then formatted back into the target base. Because the canonical form is exact, a round-trip such as binary β decimal β hex always produces the same number β even for values like 0xffffffffffffffff (the maximum unsigned 64-bit integer, 18,446,744,073,709,551,615 in decimal) that exceed JavaScriptβs native Number range. Negative values keep a leading minus sign in every base; fractional values are not supported in this version.
