Skip to content

Number base converter

Type a number in binary, octal, decimal, hex or any base up to 36 and see it in every common base at once, with digits grouped for easy reading and a bit count.

  • Free, no limits
  • No sign-up
Everything happens in your browser; your data is never uploaded.
  • ✓ Free
  • ✓ No sign-up
  • ✓ Nothing uploaded

Next step

What to do next

How to use it

  1. Type the number.
  2. Choose the base it's written in.
  3. Read it in binary, octal, decimal and hex.
  4. Add a custom base (2–36) if you need one.
Try it now

How positional number systems work

In base 10 each digit position is worth ten times the one to its right: 255 = 2 × 100 + 5 × 10 + 5 × 1. Other bases work the same way with a different multiplier. In binary (base 2) the positions are worth 1, 2, 4, 8, 16 and so on, so 11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. In hexadecimal (base 16) they're worth 1, 16, 256, 4,096…, and the digits 10 to 15 are written A to F, so FF = 15 × 16 + 15 = 255.

Same number, four bases

DecimalBinaryOctalHex
0000
711177
10101012A
15111117F
16100002010
100110010014464
25511111111377FF
1,024100000000002000400
65,5351111111111111111177777FFFF

Where you'll use each base

  • Binary is how computers store data. Each digit is a bit; eight bits make a byte.
  • Hexadecimal is a compact way to write binary: one hex digit is exactly four bits. You'll see it in HTML colors (#FF8800), memory addresses, MAC addresses and error codes.
  • Octal groups bits in threes and survives mainly in Unix file permissions (chmod 755).
  • Base 36 uses all digits and letters and is used for short IDs and URL shorteners.

The result shows binary in groups of four and hex in groups of two, which makes long values easier to read and copy. The copy button copies the plain digits without spaces.

Big numbers and prefixes

The converter works with whole numbers of any length, not just the 64-bit range of a typical calculator, so you can convert a 40-digit decimal number or a 256-bit hex key exactly. The 0x prefix for hex and 0b for binary are optional; letters can be upper or lower case. A minus sign is kept. The bit count shows how many binary digits the number needs, ignoring the sign. If you type a digit that isn't valid for the chosen base, such as 2 in binary or G in hex, the tool lists the allowed digits.

Converting by hand

To convert decimal to another base, divide by the base repeatedly and write down the remainders from last to first. 156 in binary: 156 ÷ 2 = 78 r 0, 78 ÷ 2 = 39 r 0, 39 ÷ 2 = 19 r 1, 19 ÷ 2 = 9 r 1, 9 ÷ 2 = 4 r 1, 4 ÷ 2 = 2 r 0, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1. Reading upward gives 10011100. Hex to binary is even easier: replace each hex digit with its four-bit pattern (9 = 1001, C = 1100, so 9C = 10011100). To see text as binary, try the binary translator.

Frequently asked questions

How do I convert binary to decimal?

Add up the place values of every 1. For 1011: 8 + 0 + 2 + 1 = 11.

What is FF in decimal?

FF in hexadecimal is 255.

Why do programmers use hex?

Each hex digit stands for exactly four bits, so a byte is always two hex digits. It's much shorter than binary and easy to convert back.

Does it handle negative numbers or fractions?

Negative whole numbers, yes; the minus sign is kept. Fractions and floating-point numbers aren't supported.

What does the 0x prefix mean?

It's a common way to mark a number as hexadecimal in code, for example 0xFF. You can type it or leave it out.

Last updated: November 12, 2026

Recommended

Similar tools

If Number base converter helped, you may need these too.

See all in category →

People also use