Binary Converter

Convert whole numbers exactly between binary, decimal, hexadecimal and octal.

Your calculation

Up to 256 digits, with an optional minus sign. No 0x/0b prefix or separators.

Changing the base reinterprets your input. Negative numbers use a minus sign, not a two’s-complement bit pattern.

Result

Decimal

255

Binary
11111111
Hexadecimal
FF
Octal
377

Exact integer conversion with native BigInt; no decimal rounding.

Calculated in your browser. Your inputs are not sent to a server.

How to use this calculator

Choose the input base and type digits valid for that base. A leading minus sign is allowed. Results appear in all four bases and can be copied together.

The math behind it

Value = sum of each digit × base^position
Convert the same exact integer into bases 2, 8, 10 and 16

A worked example

Hexadecimal FF equals decimal 255, binary 11111111 and octal 377.

Assumptions & precision

Native BigInt arithmetic, so large integers remain exact. Up to 256 input digits plus an optional minus sign. No fractional numbers, exponent notation, 0x/0b prefixes or separators. Hexadecimal output uses uppercase. Changing the selected base reinterprets the entered digits.

A common question

How are negative numbers represented?

With a leading minus sign. This tool does not assume a fixed bit width or generate two’s-complement storage patterns.