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.

Spaces, commas and underscores are ignored. A grouped number can be pasted as-is.

The base decides what the letters mean. In base 16 the digit f stands for 15 in decimal.

Grouping is visual only.

No padding keeps the shortest form.

Type a value and the five rows update as you type. Digits are 0-9 and a-z, and letters are case-insensitive.

Binary (base 2)
Waiting for input.
Octal (base 8)
Waiting for input.
Decimal (base 10)
Waiting for input.
Hexadecimal (base 16)
Waiting for input.
Base 36
Waiting for input.

How to use

  1. 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.
  2. Type or paste the value. Letters are case-insensitive, and spaces, commas and underscores are ignored, so results refresh on every keystroke.
  3. 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.
  4. 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.
  5. 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?
Every conversion runs through BigInt, which does arbitrary-precision integer math. The JavaScript Number type holds integers exactly only up to 2 to the power of 53, and beyond that the last digits drift. Hashes, memory addresses and snowflake IDs routinely need 64 bits, so this tool prints 2^64-1 as 18446744073709551615 with all 64 binary digits in place.
Which characters work, and can I enter decimals?
Digits are 0-9 and a-z, giving 36 symbols worth 0 to 35, and letters are case-insensitive. Spaces, commas and underscores count as separators and are ignored. Only integers are handled here, so a decimal point or a full-width digit is reported as an error along with the exact character and position.
Does switching the input base convert my value?
No. The input base only changes how the digits are read, while the value stays as typed. Moving the setting from decimal to hex turns 255 into 0x255, which is 597 in decimal. To convert, leave the base alone and read the matching row below instead.
Does digit grouping change what I copy?
No. Grouping is a display effect only: decimal groups three digits with a comma, and other bases group four digits with a space. The copy button always yields plain digits with no separators, ready to paste into code, a config file or a shell command.
How do width padding and negative values behave?
With 8, 16 or 32 bit selected, binary, octal and hex pad to that width, while decimal and base 36 keep their natural form. Negative values print as two's complement, so -1 in 8 bit shows as 11111111 and ff. A value outside the selected range raises an error with the limits instead of being truncated.

How to use

  1. 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.

  2. 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.

  3. Turn on display options

    Switch letter case, group long digits for readability, or pad the output to 8, 16 or 32 bit.

  4. 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

  1. 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.

  2. 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.

  3. 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.

Related Tools