Number bases in one minute
We normally write numbers in base 10, where each position is worth ten times the one on its right. Computers work in base 2 (binary), where each position is worth twice the previous one and only the digits 0 and 1 exist. Hexadecimal (base 16) is a compact way to write binary, since one hex digit stands for exactly four bits; it uses 0 to 9 and A to F. Octal (base 8) groups bits in threes and appears in Unix file permissions. For example, decimal 255 is 11111111 in binary, FF in hex and 377 in octal.
How the converter works
The number you type is read digit by digit in the base you selected and accumulated using BigInt arithmetic, so there is no 53-bit limit and very large values stay exact. It is then written out in the other bases. Prefixes such as 0x, 0b and 0o and separators such as spaces and underscores are accepted. A leading minus sign is kept. If you enter a digit that does not exist in the chosen base, for instance a 2 in a binary number, the tool says the number is invalid instead of returning nonsense.
Converting by hand
- Binary to decimal: add the place values where there is a 1. 1011 is 8 + 2 + 1 = 11.
- Decimal to binary: divide by 2 repeatedly and read the remainders from bottom to top.
- Hex to binary: replace each hex digit by its four-bit pattern. 3F becomes 0011 1111.
Text to binary and hex
Text is stored as numbers. The tool converts your text to UTF-8 bytes and writes each byte as 8-bit binary, two-digit hex or decimal. The letter H is byte 72, which is 01001000 in binary and 48 in hex. Plain English letters take one byte each, accented letters take two bytes, and most emoji take four, so "é" becomes 11000011 10101001. To decode, paste bytes separated by spaces and choose the matching format. Invalid bytes or sequences that are not valid UTF-8 produce an error.
Privacy
All conversions run in your browser, and nothing you type is sent anywhere.