Binary / Hex / Decimal Converter

Convert between binary, octal, decimal and hex instantly. Also shows base 32 and base 36. Handles arbitrarily large numbers.

Calculated in your browser. No data sent to servers.

Formula reviewed Jan 2025

Paste any value in binary, octal, decimal or hex. The tool detects the format.

Interpret input as

Converted values

-

-

Binary (base 2)

-

Octal (base 8)

-

Decimal (base 10)

-

Hexadecimal (base 16)

-

Base 32

-

Base 36

-

How to use this calculator

Paste any value - the tool detects the base automatically. Override the detection with the radio buttons if needed.

The formula behind this result

Input is parsed character-by-character into a BigInt using the chosen base. Output uses BigInt.toString(radix), which supports any base from 2 to 36.

Frequently asked questions

What is hex used for?

Hexadecimal is a compact way to write binary. Each hex digit represents exactly four bits. It is used everywhere in programming, from colour codes to memory addresses.

Does this handle huge numbers?

Yes. It uses JavaScript's BigInt, so precision is exact for any length of input.

What does the 0x prefix mean?

0x tells most programming languages that the following digits are hexadecimal. 0b is binary, 0o is octal.

Why do binary numbers get long so quickly?

Each additional bit doubles the value. A ten-digit decimal number can need over thirty binary digits.

Can I convert negative numbers?

The tool handles positive numbers. Signed representations like two's complement are language-specific and would need a separate tool.

Explore more