Number Base Converter
Your data never leaves your browserConvert numbers between binary, octal, decimal, and hexadecimal instantly. Supports arbitrarily large integers.
Share this tool
Found it useful? Help a fellow developer discover it.
Convert numbers between binary, octal, decimal, and hexadecimal instantly. Supports arbitrarily large integers.
Share this tool
Found it useful? Help a fellow developer discover it.
| Base | Name | Digits | Prefix | Common use |
|---|---|---|---|---|
| 2 | Binary | 0–1 | 0b | Bitwise ops, hardware, flags |
| 8 | Octal | 0–7 | 0o | Unix permissions (chmod 755) |
| 10 | Decimal | 0–9 | - | General-purpose arithmetic |
| 16 | Hexadecimal | 0–9, A–F | 0x | Memory addresses, colors, bytes |
Binary (base 2) maps directly to hardware, each digit is a single bit. Because binary numbers are verbose, hexadecimal (base 16) is used as a compact shorthand: every hex digit represents exactly four bits, so a byte is always two hex digits (00–FF). This makes hex ideal for memory addresses, color codes, and byte-level debugging. Octal (base 8) was common on older Unix systems where each digit represents three bits, you still see it in Unix file permission masks (755, 644) and some assembly languages. Decimal is what humans naturally use and is the default in most high-level languages.
Group the binary digits from the right into groups of 4. Each group of 4 bits maps directly to one hex digit: 0000=0, 0001=1, …, 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F. For example, 11111111 binary splits into 1111 1111, which is FF in hex.
Unix permissions have 3 groups of 3 bits (rwx for owner, group, and other). Three bits fit neatly into one octal digit (0–7), so the full 9-bit mask is expressed as 3 octal digits. For example, rwxr-xr-x = 111 101 101 = 755 in octal.
This tool uses JavaScript's BigInt for arbitrary-precision arithmetic, so there's no practical upper limit. You can convert numbers with thousands of digits.
Yes. Prefix your input with a minus sign (for example .255). The tool converts the absolute value and applies the sign to all outputs. It does not use two's complement notation.
Type your decimal number into the decimal field and the binary equivalent appears instantly. For example, 255 in decimal is 11111111 in binary. The algorithm divides by 2 repeatedly and reads the remainders from bottom to top. This tool uses JavaScript BigInt so you can convert arbitrarily large numbers without overflow.
0x is a prefix used in C, C++, JavaScript, Python, Go, and most other languages to indicate a hexadecimal number. For example, 0xFF equals 255 in decimal. The prefix is not part of the numeric value, it is a notation convention. Similarly, 0b is used for binary and 0o for octal in most modern languages.
Multiply each hex digit by 16 raised to its position from the right (starting at 0). For example, 0x3B: B is decimal 11, times 16 to the power 0 = 11. Then 3 times 16 to the power 1 = 48. Total: 11 + 48 = 59. For quick lookup: A=10, B=11, C=12, D=13, E=14, F=15.
Memory addresses and byte values are inherently binary. Hexadecimal is a compact shorthand: every 4 binary bits map to exactly one hex digit, so a 32-bit address is exactly 8 hex digits. The same address in binary would be 32 characters long. Hex stays close to the underlying binary representation while remaining compact enough to read.
HEX / RGB / HSL Color Converter
Convert colors between HEX, RGB, and HSL formats instantly.
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from any string.
Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and vice versa.
Unicode Lookup
Look up Unicode code points, HTML entities, hex values, and UTF-8 bytes for any character or text. Supports emoji.