Number Base Converter

Runs in your browserConverters#Developer#Math

Convert whole numbers between binary, hex, decimal, octal and any base, with two's complement.

Bit width
Bits needed
8
16-bit two's complement (hex)
00 FF
16-bit two's complement (binary)
0000 0000 1111 1111
Read as signed 16-bit
255
How to use, limits & privacy

About Number Base Converter

Convert whole numbers between decimal, hexadecimal, binary, octal and any base from 2 to 36. Type in any field and the others follow. Numbers of any size stay exact, negative numbers work, and the tool shows the 8, 16, 32 or 64-bit two's complement form. It is useful for programming, electronics and computer science classes, and it runs in your browser.

How to Use

1

Type a number in any field

Use the Decimal, Hexadecimal, Binary, Octal or Other base field. Prefixes such as 0x, 0b and 0o, spaces and underscores are accepted.

2

Read the other bases

Every other field updates as you type. Turn on Group digits to split binary into fours and hexadecimal into bytes.

3

Check the bit width

Pick 8, 16, 32 or 64-bit to see the two's complement form and how the value reads as a signed number. Use the copy button next to any field.

Privacy & Processing

  • Mode: local
  • Files Leave Browser: Local tool processing; review details below
  • Max Input Size: Device memory limits
  • Account Required: No
  • Data Stored Locally: Nothing is saved; the fields reset when you leave the page.
  • Network Processing: Assets or models may require an initial download

Everything is calculated in your browser. Nothing you type is sent anywhere.

Rules & Limitations

  • Whole numbers only: fractions such as 10.5 are not supported.
  • Letters for bases above 10 are shown in capitals (FF); input can be upper or lower case.
  • Negative numbers are shown with a minus sign in each base; the two's complement form appears below for the chosen bit width.
  • A 0x, 0b or 0o prefix overrides the field, so 0xFF typed in the Decimal field is read as hexadecimal.

Top Suggestions

  • Converting a hex colour or memory address to decimal
  • Checking binary answers for a computer science assignment
  • Finding the two's complement of a negative number for C or assembly code
  • Reading a register value as a signed 16 or 32-bit number

Number Base Converter FAQ

How do I convert binary to decimal?

Type the binary number in the Binary field. The Decimal field shows the value at once, for example 1111 1111 is 255.

How do I convert a negative number to hexadecimal?

Type it with a minus sign, for example -42. The Hexadecimal field shows -2A, and the details below show the two's complement for the chosen width: FF D6 at 16 bits.

What is two's complement?

It is how computers store negative whole numbers: the value is 2 to the power of the bit width plus the negative number. So -1 in 8 bits is 1111 1111 (FF), and -128 to 127 fit in 8 bits.

Can it convert very large numbers?

Yes. Numbers of any length are converted exactly, for example 18446744073709551615 is FFFFFFFFFFFFFFFF, with no rounding.

Is my input sent anywhere?

No. The conversion runs in your browser and nothing is uploaded.