Number Base Converter

Enter a number to see it in binary, octal, decimal and hexadecimal at once.

Binary
-
Octal
-
Decimal
-
Hexadecimal
-
Base N
-
Bits needed
-

Everything you enter is processed inside this browser and is never sent to a server.

How to use it

Type a number and pick its base. Binary, octal, decimal and hexadecimal appear at once, and "N for base N" adds any base from 2 to 36. Prefixes such as 0x1F and 0b1010 and separators such as 1111_0000 or FF FF are accepted. Numbers of any length are converted exactly.

Quick reference

DecimalBinaryOctalHex
711177
10101012A
15111117F
16100002010
100110010014464
25511111111377FF
1024100000000002000400
655351111111111111111177777FFFF

Two's complement

Choose a bit width (8, 16, 32 or 64) and enter a negative number to see its two's-complement bit pattern: −1 is 11111111 (FF) in 8 bits and −128 is 10000000 (80). Enter a positive number with a bit width to see the pattern read as a signed value: FF is 255 unsigned but −1 as a signed 8-bit value.

Frequently asked questions

Can it convert fractions such as 0.1?

No, integers only. Decimal 0.1 has no finite binary representation.

Is my input sent anywhere?

No. Everything is calculated in your browser.