Number base converter
0x, 0b and 0o prefixes are accepted, so you can paste straight out of code. Values are handled as big integers - a full 64-bit hex value converts exactly.
Every base at once
Most converters ask you to pick a "from" and a "to". That is rarely the question. When you are looking at a value you usually want to know what it is in all of them, so here every box is live: type into any one and the rest follow.
Why large values matter here
JavaScript numbers are double-precision floats, which can only hold consecutive whole numbers up to 2^53. A 64-bit hexadecimal value — a memory address, a hash, a flags field, exactly the kind of thing people bring to a base converter — is far past that. A tool built on parseInt will return an answer for it, and the answer will be wrong, with nothing to indicate that.
This one uses arbitrary-precision integers throughout, so ffffffffffffffff converts to 18446744073709551615 exactly rather than to something rounded.
Prefixes and separators
0x, 0b and 0o are accepted so you can paste straight out of source code, and spaces, commas and underscores are ignored so grouped binary like 1010 1010 works as typed.
Reading the bit width
Underneath the boxes is how many bits the value needs, and whether it fits in a byte, 16, 32 or 64 bits. That is usually the reason for converting in the first place: checking a value will fit the field it is going into.
What each base is for
- Binary — flags, masks and permissions, where individual bits carry meaning.
- Octal — Unix file permissions, where each digit is neatly three bits.
- Hexadecimal — addresses, colours and hashes, where each digit is four bits and bytes read as pairs.
- Base 36 — short identifiers, using every digit and letter.
Related tools
For text rather than numbers see the text to binary encoder, the binary to text decoder and the Base64 encoder.