1001Ferramentas
🔢 Converters

Numeric Bases Converter

Convert numbers between binary (base 2), decimal (base 10), hexadecimal (base 16) and octal (base 8). Type in any field for instant conversion in the others.

Quick reference table

Decimal Binário Hex Octal
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5
6 0110 6 6
7 0111 7 7
8 1000 8 10
9 1001 9 11
10 1010 A 12
11 1011 B 13
12 1100 C 14
13 1101 D 15
14 1110 E 16
15 1111 F 17

How do number bases work?

In positional numeral systems, the base tells you how many distinct symbols the system has. A digit's value changes with the position it sits in, which corresponds to a power of the base.

  • Binary (base 2): uses only 0 and 1. Fundamental for computers (bits).
  • Decimal (base 10): everyday system with digits 0 to 9.
  • Hexadecimal (base 16): uses 0-9 and A-F. Compact for representing bytes (1 byte = 2 hex digits).
  • Octal (base 8): uses digits 0-7. Each octal digit equals 3 binary bits.

Convert between binary, decimal, hex and octal

Anyone who codes or studies computing is forever switching number bases. There's everyday decimal, the machine's binary, the hexadecimal of colours and memory addresses, the octal of permissions. This converter puts the same number in all four bases at the same time.

Type the value in any of the fields, be it base 2, 10, 16 or 8, and the rest fill themselves in with the conversion. Rather than doing successive division by hand or turning to the scientific calculator, you see every representation at once, ready to use.

The calculation happens in the browser. It works as a quick reference for programming, digital electronics, networking and computing studies.

Frequently asked questions

Can it convert negative or fractional numbers?
No. Each field takes only the digits of its own base: 0 and 1 for binary, 0 to 9 for decimal, 0 to 9 plus A to F for hex, 0 to 7 for octal. A minus sign, comma, dot or space trips the red warning under the field and clears the other three boxes. For a fractional value, convert the whole part here and handle the digits after the point separately, multiplying them by the base you want.
What does the 8 bits · 1 byte in the corner mean?
It shows how much room the number takes up in binary. The bit count matches the position of the leftmost 1, that is, the integer part of the base-2 logarithm plus one; the byte figure groups those bits in eights, rounding up. Decimal 219 becomes 11011011, hence 8 bits and 1 byte. Zero counts as 1 bit. Useful as a quick check on whether a value fits in a single byte, in two, and so on.
Why does a very large number come back different from what I typed?
Because the conversion goes through the JavaScript number type, exact only up to 9,007,199,254,740,991, which is 2 to the 53rd minus 1. Past that the trailing digits get rounded, and a binary string with more than 53 significant digits returns altered once converted back. In practice, keep values within 16 decimal digits, or 53 bits, for results you can trust. Everyday addresses, masks and permissions sit well under that ceiling.

Related Tools