Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36.

base

How to use the Number Base Converter

  1. Type a number into the binary, octal, decimal or hexadecimal field.
  2. All other bases update instantly.
  3. Use the custom base field for any base from 2 to 36.

About this tool

Computers work in binary, programmers often write in hexadecimal, Unix permissions use octal and people think in decimal. This number base converter translates whole numbers between all of them at once – type in any field and the others update.

It also converts to and from any custom base between 2 and 36, and uses arbitrary-precision BigInt arithmetic, so even 64-bit and larger values convert exactly without rounding errors. Negative numbers are supported.

Frequently asked questions

Multiply each digit by 2 raised to its position (counting from 0 on the right) and add them. 1011 = 8 + 0 + 2 + 1 = 11.

Each hex digit represents exactly four bits, so a byte is always two hex digits. That makes binary data, colors (#FF8800) and memory addresses much easier to read.

This tool converts whole numbers (integers) exactly. Fractional values are not supported because many fractions cannot be represented exactly in other bases.

Divide the number by 16 repeatedly and write down the remainders from last to first, using the letters A–F for 10–15. For example, 255 ÷ 16 = 15 remainder 15, which gives FF. The number base converter does this instantly for binary, octal, decimal and hexadecimal, even for numbers far larger than an ordinary calculator can handle.