Skip to content
OneTooling

Number Base Converter

Convert numbers between binary, octal, decimal, hex, and any base from 2 to 36. Handles huge numbers and two's complement. Runs in your browser.

Runs in your browser · nothing uploaded
Number is written in

In every base

Binary (base 2)
1111 1111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
All other bases from 3 to 36
Base 3
100110
Base 4
3333
Base 5
2010
Base 6
1103
Base 7
513
Base 9
313
Base 11
212
Base 12
193
Base 13
168
Base 14
143
Base 15
120
Base 17
F0
Base 18
E3
Base 19
D8
Base 20
CF
Base 21
C3
Base 22
BD
Base 23
B2
Base 24
AF
Base 25
A5
Base 26
9L
Base 27
9C
Base 28
93
Base 29
8N
Base 30
8F
Base 31
87
Base 32
7V
Base 33
7O
Base 34
7H
Base 35
7A
Base 36
73

Two’s complement

Bit width
Binary (8 bits)
1111 1111
Hexadecimal
FF
Read as signed
-1
Read as unsigned
255

Negative numbers are stored by flipping every bit and adding one. Enter a negative number to see its bit pattern, or a large positive one to see how the same bits read as signed.

Why is there an ad? This tool is free and runs on your device. One small ad pays for hosting and new tools. No pop-ups, no autoplay, never inside the tool. How we make money

How to convert between number bases

  1. Choose the base your number is written in: binary, octal, decimal, hex, or Other for any base from 2 to 36.
  2. Type or paste the number. Prefixes such as 0x, 0b, and 0o are accepted, and so are spaces and underscores between digits.
  3. Read the result in binary, octal, decimal, and hex, or open the list of other bases. Press the copy button next to any row.

For bases above 10, letters stand for digits: A is 10, B is 11, up to Z for 35. Pick a bit width under two’s complement to see how a number is stored in 8, 16, 32, or 64 bits.

Questions

Is my number sent anywhere?

No. The conversion is done by your browser, so nothing is uploaded or stored.

How large a number can it convert?

Any size you can paste, up to 20,000 digits. The tool uses BigInt, so there is no rounding, unlike a calculator that stores numbers as floating point after about 16 digits.

How do I convert binary to decimal, or decimal to hex?

Pick the base your number is written in under "Number is written in", then type the number. Every other base appears at once, so one entry gives you binary to decimal, decimal to hex, hex to binary, and the rest.

What is two's complement?

It is the way computers store negative whole numbers. To negate a number, flip all of its bits and add one. In 8 bits, -1 is 11111111 and -128 is 10000000. Choose a bit width to see the pattern for your number, and how the same bits read as signed and unsigned.

Does it support fractions or negative numbers?

Negative whole numbers work in every base, shown with a minus sign. Fractions such as 0.1 are not supported; only whole numbers are converted.

Credits

Built by OneTooling using standard browser features. No third-party code runs on your data.