Number base converter
Type a number in any base and see it in binary, octal, decimal and hexadecimal.
Bases in programming
- Binary (base 2): how computers store everything. Prefix
0bin many languages. - Octal (base 8): Unix permissions like 755. Prefix
0o(or a leading 0 in C). - Decimal (base 10): everyday numbers.
- Hexadecimal (base 16): colors, memory addresses and bytes. Two hex digits make one byte. Prefix
0x.
Numbers of any size are supported, using JavaScript's BigInt.
Questions
What is 255 in hex?
FF. It's 11111111 in binary, the largest value one byte can hold.
Can I paste numbers with 0x or 0b prefixes?
Yes. Prefixes, spaces and underscores are ignored.