In this number base converter, type a number into any field (binary, octal, decimal, hexadecimal or a custom base from 2 to 36) and the other fields update instantly. Long values stay exact because the maths uses BigInt. You can group digits for readability and see the 8, 16, 32 and 64-bit two’s complement form of negative numbers. It all runs in your browser.
Loading the tool… It runs in your browser and needs JavaScript.
Table of Contents
How to use the converter
Type or paste into any field. Prefixes are accepted where they make sense (0x for hex, 0b for binary, 0o for octal), as is a leading minus sign. Spaces, underscores and commas between digits are ignored, so 1111_0000, DEAD BEEF and 1,000,000 all work. If a digit is not valid for that base, the field is marked and the message names the character. Group digits splits binary and hex into blocks of four, octal into threes and decimal into thousands. Values of up to 4,096 digits are supported.
How number bases work
In base b, each position is worth b times the one to its right. Hex FF is 15 × 16 + 15 = 255, and binary 1010 is 8 + 2 = 10. Bases above 10 use letters for the extra digits: A to F in hex, up to Z (35) in base 36. Base 36 is often used for short IDs and URL slugs. One hex digit is exactly four bits and one octal digit exactly three bits, which is why these bases are popular in computing.
Two’s complement explained
Computers store signed integers in two’s complement: a negative number −x in n bits is stored as 2n − x. For example, −42 in 8 bits is 256 − 42 = 214, which is D6 in hex or 1101 0110 in binary. The fixed-width table shows this for 8, 16, 32 and 64 bits and marks widths the value does not fit.
The table also works the other way. Enter a positive bit pattern and the Read as signed column shows what it means as a signed integer, so FF as an 8-bit value is −1. This helps when decoding log fields, packet captures or C structs.
Why BigInt matters
Ordinary JavaScript numbers are exact only up to 9,007,199,254,740,991 (Number.MAX_SAFE_INTEGER). Many online converters silently round 64-bit values beyond that. This tool uses BigInt, which has no such limit, so a 64-bit hash or a 200-bit value converts digit for digit.
For server admins: quick conversions in the shell
printf '%x\n' 255 # decimal to hex: ff
printf '%d\n' 0xff # hex to decimal: 255
echo $((2#1010)) # binary to decimal: 10
echo 'obase=2; 255' | bc # decimal to binary: 11111111File permissions are octal. In chmod 755, each digit is three bits, so 7 is 111 (rwx) and 5 is 101 (r-x). Enter 755 in the octal field to see the bits.
Number Base Converter at a glance



Related tools: Binary Translator: Text to Binary and Back · ASCII and Unicode Code Converter · IP Address Converter · chmod Calculator.
Official documentation (checked 9 October 2026): BigInt – JavaScript | MDN
Frequently asked questions
How large a number can I convert?
Up to 4,096 digits in the field you type into. All maths uses BigInt, so results are exact.
What does two’s complement show for positive numbers?
The value padded to 8, 16, 32 and 64 bits, plus how that bit pattern would be read as a signed number, for example FF as 8-bit is -1.
Can I paste values with spaces or 0x?
Yes. Spaces, underscores and commas between digits are ignored, and the prefixes 0x, 0b and 0o are accepted.