ToolGlint

Number Base Converter

Convert numbers between binary, octal, decimal and hexadecimal, including very large values. Runs in your browser.

Runs in your browser. Nothing you enter is uploaded or stored.

How to use the Number Base Converter

  1. Type a number into any of the boxes: binary, octal, decimal or hexadecimal.
  2. The other boxes update at once to show the same number in each base.
  3. Choose another base from 2 to 36 in the list to see the number in that base as well.
  4. Tick Uppercase letters or Group digits to change how the results are written.
  5. Press Copy beside any box to copy that value.

Questions and answers

What is a number base?
A base is how many different digits a number system uses. Decimal, base 10, uses 0 to 9. Binary, base 2, uses only 0 and 1. Hexadecimal, base 16, uses 0 to 9 and then a to f for the values ten to fifteen. The same quantity can be written in any base: 255 in decimal is ff in hex and 11111111 in binary.
How do I convert binary to decimal by hand?
Each binary digit stands for a power of two, starting from 1 on the right and doubling each step to the left. Add the values where the digit is 1. For 1011 that is 8 + 0 + 2 + 1, which is 11.
How large a number can it convert?
Up to 5,000 digits. The tool does exact whole-number arithmetic, so a 64-bit, 128-bit or far longer value converts without the rounding that ordinary calculators introduce above about sixteen digits.
Can I type prefixes such as 0x or 0b?
Yes. The hex box accepts 0x, the binary box 0b and the octal box 0o. Spaces, underscores and commas inside a number are ignored, so values copied from code or a spreadsheet can be pasted as they are.
Does it handle negative numbers and fractions?
Negative whole numbers work: put a minus sign in front, and each base shows the value with a minus sign. It does not show two’s complement, which depends on a fixed number of bits. Fractions such as 0.5 are not supported.
Why is hexadecimal used so much in computing?
One hex digit stands for exactly four binary digits, so a byte is always two hex digits. That makes hex a compact and exact way to write binary data, which is why it appears in color codes, memory addresses, hashes and network addresses.

Related tools