←

Number Base Converter

Binary, octal, decimal, hex and more
Binary
1111 1111
Octal
377
Decimal
255
Hexadecimal
FF
73
More info

How to use it

Type a number, say which base it is written in, and see it in binary, octal, decimal and hexadecimal at once, plus one more base of your choice up to 36. Spaces and underscores are ignored, so you can paste 1111 0000 or 0xFF_EC, and the prefixes 0x, 0b and 0o work in their bases. A minus sign gives negative numbers. Long numbers (hundreds of digits) stay exact.

What a base is

Decimal uses ten digits, so each place is worth ten times the one to its right. Binary uses two (0 and 1), and each place is worth double. Hexadecimal uses sixteen (0 to 9, then A to F), which is handy because one hex digit is exactly four binary digits: 1111 is F. Octal uses eight digits and groups binary in threes. Bases above 10 use letters for the extra digits, up to Z for base 36.

Questions

Why is my input marked wrong? A digit may be too big for the base, such as a 2 in binary or a G in hex. The message lists the digits that base allows.

Does it handle fractions? No, whole numbers only. For colours, the Color Picker shows hex values.

Is two’s complement supported? Not directly. Negative numbers are shown with a minus sign, not as a fixed-width bit pattern.