About the Number Base Converter
Every field is live: edit the binary, octal, decimal, hexadecimal or custom-base value and the others follow. The converter uses JavaScript BigInt, so values are not limited to 253 like ordinary JavaScript numbers — you can paste a 256-bit hash in hex and get its exact decimal value. Prefixes 0b, 0o and 0x, underscores and spaces are accepted, so literals copied from code (0xDEAD_BEEF) work as they are.
The custom base goes up to 36, using the digits 0–9 then a–z; this matches Number.prototype.toString(radix) and parseInt(s, radix) in JavaScript and int(s, base) in Python. Base 36 is a common choice for short IDs because it is the most compact case-insensitive alphanumeric encoding. The bit view groups the binary value into nibbles and bytes and shows how many bytes it needs.
The two's complement table answers the question “what are these bits as a signed or unsigned integer?”. A negative number is stored as 2n + value, so −1 is FF in 8 bits and FFFFFFFF in 32 bits. For a positive input the table shows how the same bit pattern reads as a signed type — 200 in a signed byte (int8, Java byte) becomes −56. This is exactly what happens when a C or Java program casts between signed and unsigned types.
How to use it
- Type or paste a number into the field for its base (prefixes like 0x are fine).
- Read the value in all other bases; pick any base from 2 to 36 for the custom field.
- Check the grouped bits and the two's complement table for 8, 16, 32 and 64 bits.
- Click Copy next to the value you need.