Number Base Converter (Binary, Hex, Octal)

Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36 — with a bit-by-bit view and two's complement.

InstantPrivate — runs in your browserFree, no sign-up

Your details

Prefixes 0x, 0b and 0o are understood. Very large numbers are fine.

Result

How to use

  1. 1

    Type a number and choose its base (or let the prefix decide).

  2. 2

    See it in decimal, hex, octal, binary and any custom base.

  3. 3

    Use the bit view and bit width to check two's-complement values.

Questions

How do I convert hex to decimal?

Each hex digit is worth 16 times the next one. For example 0xFF = 15 × 16 + 15 = 255. Choose Hexadecimal as the input base (or type the 0x prefix) and the decimal value appears instantly.

What is two's complement?

It is how computers store negative integers: −1 in 8 bits is 11111111 (0xFF), and the top bit acts as the sign. Pick a bit width to see both the unsigned and the signed meaning of the same bits.

Is there a limit on size?

No practical limit — the converter uses JavaScript BigInt, so numbers with hundreds of digits convert exactly without rounding.

About this Number Base tool

Number Base Converter (Binary, Hex, Octal) — Convert numbers between binary, octal, decimal, hexadecimal and any base up to 36 — with a bit-by-bit view and two's complement. It is one of 200 free tools on namasivayam.in, made by software engineer Namasivayam Vadivelan for everyday use in India.

Everything is calculated instantly in your browser: nothing you type or upload is sent to any server, there is no sign-up, and it works on mobile and desktop. Type a number and choose its base (or let the prefix decide).

Related reading

Articles that go with this tool

All articles →

Related tools

More developer tools you may like

All 200 tools →

Results are estimates to help you plan. They are not financial, tax or medical advice.