Convert numbers between binary, octal, decimal, hex and any base from 2 to 36, with BigInt precision, negative numbers and two's complement views.
Reading a memory address in hex, checking a bitmask in binary, decoding a Unix permission in octal or shortening an ID into base 36 all mean converting the same number between bases. This tool converts between binary, octal, decimal and hexadecimal - plus any base from 2 to 36 - using BigInt, so large values stay exact instead of rounding the way a regular JavaScript number does. It also shows the two's complement form of the value at 8, 16, 32 and 64 bits. Everything runs in your browser.
A normal JavaScript number is a 64-bit float and loses exactness above 9,007,199,254,740,991 (2^53 - 1), which breaks conversions of 64-bit values. BigInt is exact at any size, so 0xFFFFFFFFFFFFFFFF converts to 18446744073709551615 with no rounding. The only practical limit is how long a string your browser can handle.
It is how computers store signed integers: a negative number -n is stored as 2^bits - n, so -1 in 8 bits is 11111111 (FF). The two's complement section shows that stored pattern for 8, 16, 32 and 64 bits. A value is shown if it fits as either a signed or an unsigned number of that width (for 8 bits, -128 to 255); otherwise the tool tells you it does not fit.
Yes. Enter a leading minus sign and the results keep it (-255 is -FF in hex). To see the fixed-width bit pattern a CPU would store, look at the two's complement rows.
No. This tool converts integers only. Fractional values and floating-point bit layouts (IEEE 754) are a different conversion.
Bases up to 10 use the digits 0 to base-1. Higher bases continue with letters, so hex uses 0-9 and A-F, and base 36 uses 0-9 and A-Z. Letters are not case sensitive on input, and results are shown in uppercase. If you type a digit that does not belong to the chosen base, the tool names the character instead of guessing.
No. Conversion is done with BigInt arithmetic in your browser, so nothing you type leaves your device.
← All tools · Blog · Cheat sheets · FAQ