Number Base Converter
Enter an integer in any base from 2 to 36 to see binary, octal, decimal, hex and base-36 results. Big integers stay exact through BigInt, and every row copies in one click.
How to use
- Set the input base: decimal is the default, and any whole number from 2 to 36 works. The chips for 2, 8, 10, 16 and 36 switch it with one click.
- Type or paste the value. Letters are case-insensitive, and spaces, commas and underscores are ignored, so results refresh on every keystroke.
- Adjust the display when needed: letter case, digit grouping and width padding sit in the options below, and all five rows re-render at once.
- Pick 8, 16 or 32 bit when a fixed width matters. Binary, octal and hex pad to that many digits, and negative values print as two's complement.
- Press Copy on any row to put that result on the clipboard. The copied text never contains grouping separators.
FAQ
Why do very large numbers stay exact?
Which characters work, and can I enter decimals?
Does switching the input base convert my value?
Does digit grouping change what I copy?
How do width padding and negative values behave?
How to use
- Pick the input base
Set the base above the value box, or use a chip for 2, 8, 10, 16 or 36. The base decides what letters mean, so f in base 16 stands for 15 in decimal.
- Type or paste the value
The five rows refresh on every keystroke, so no button is needed. Spaces, commas and underscores are ignored, which makes grouped numbers easy to paste.
- Turn on display options
Switch letter case, group long digits for readability, or pad the output to 8, 16 or 32 bit.
- Copy the row you need
Each row has its own Copy button. The clipboard receives plain digits with no grouping separators, ready for code, config files or a shell.
About this tool
Bases are different spellings of the same value. Binary uses two symbols per digit, octal packs three binary digits into one, and hex packs four. Base 36 spends all ten digits plus the whole alphabet. Converting does not change the number, only the symbols and the carry rhythm used to write it. This tool reads your input in the base you choose, rebuilds the integer, and writes it out in five bases at once. Five rows refresh together as you type, so the same conversion never has to be repeated step by step.
Parsing and conversion run entirely on BigInt. The Number type holds integers exactly only up to 2 to the power of 53, and past that limit the last digits drift. Hashes, memory addresses and snowflake IDs routinely need 64 bits, so Number arithmetic quietly returns wrong answers for them. BigInt works at arbitrary precision, which is why 2^64-1 prints as 18446744073709551615 with all 64 binary digits present. There is no size cap in the interface either, so a hundred-digit decimal value still converts digit for digit. Width padding and grouping change the display only, while the value itself stays complete.
How it works
Positional notation treats each digit as a coefficient of a power of the base. With base b, the digit d at position i stands for d times b to the power i. The value is the sum of all those terms. Binary needs only two symbols, which maps neatly onto the on and off states of a circuit, so hardware stores everything that way. Octal and hex are shorthand for groups of three and four binary digits, which keeps them aligned with bit fields and far shorter to read. Base 36 packs a larger range into the same number of symbols.
Fixed widths come from hardware registers and protocol fields. An 8-bit field holds 256 states, which is eight binary digits or exactly two hex digits. Negative values use two's complement: take the magnitude, flip every bit, then add one. The resulting pattern shares the same addition circuit as positive values. Minus one in 8 bits reads 11111111, or ff in hex, one of the most common patterns in debugging. Range checks need full integer comparison, because Number loses precision past 2 to the power of 53, while BigInt keeps exact limits.
When to use it
- Checking hashes and addresses
Paste an MD5 or SHA-256 digest with base 16 selected and the binary and decimal forms appear at once. Memory addresses, colour values and UUID fragments compare across bases the same way. Spaces and hyphens are ignored, so a formatted digest can go straight into the box.
- Embedded registers and protocols
Register manuals write bit fields in hex, and network headers define fields bit by bit. Enter the value from the manual, choose 8 or 16 bit padding, and the binary row lines up with the bit numbering in the document. A wrong mask or shift stands out at a glance.
- Debugging IDs and timestamps
Snowflake IDs, order numbers and Base36 short links are big integers in another dress. Read the decimal row to see the real value, then switch to base 36 to confirm the encoding rule. When a string from the API and the number in the database disagree, the base or the precision is usually the reason.
Tips & tricks
- Hex results are lowercase by default, so switch to uppercase before copying when an API expects capital letters.
- Digit grouping is a screen effect only, and the copy button always yields the plain number without separators.
- With width padding on, negative values print as two's complement, so -1 in 8 bit shows as 11111111 or ff.
Things to watch
- Changing the base does not convert
The input base only changes how digits are read, so a value of 255 stays as typed. Switching from decimal to hex reinterprets it as 0x255, which is 597. Leave the base alone and read the hex row below when you want a real conversion.
- Decimals and full-width digits fail
A decimal point raises an error at that exact position, so round the value first. Full-width digits, Chinese commas and currency symbols are rejected too, and the message names the character and its position. Switching to half-width digits clears it.
- Width padding never truncates
Choose 8 bit and enter 256 and the tool reports the range instead of silently wrapping to 0. Padding applies to binary, octal and hex only, while decimal and base 36 always keep the signed value exactly as typed, so -1 stays -1.