Skip to content

Free text & data tool

Number base converter: binary, decimal, hexadecimal and octal

Convert between binary, octal, decimal, hexadecimal and any base from 2 to 36, all at once as you type — numbers of any size, two’s complement and bytes. Free, in your browser.

Free, no sign-up to use · what you type or add stays on your device · works offline · How it works

What do you want to do?
Bits for negatives (two’s complement)

Prefixes 0x, 0b and 0o, a minus sign and _ or spaces between digits are accepted.

Bits

Ask an AI

Opens a free chat with this prompt. Check it first: it goes to the site you pick. Do not send passwords, production tokens or real customer data.

ChatGPT Claude Perplexity

Sponsor this tool

About this tool

Type a number in any field — decimal, hexadecimal, binary, octal or a base of your choice up to 36 — and every other field updates as you type. It accepts the 0x, 0b and 0o prefixes, a minus sign and _ or spaces between digits, and works with whole numbers of any size, far beyond 64 bits. The results show the binary grouped in nibbles, hexadecimal in bytes and decimal with thousands separators, each one click to copy. For negative numbers it shows the two’s complement pattern at 8, 16, 32 or 64 bits — the way computers store them — plus the big-endian bytes and what the same bits mean when read as signed. Useful for programming, networks, colour codes and computer science classes.

How to use it

  1. 1 Type the number in the field of its base (decimal, hex, binary, octal or another base).
  2. 2 Read the same value in every other base.
  3. 3 For negative numbers, choose 8, 16, 32 or 64 bits to see the two’s complement.
  4. 4 Click any result to copy it.

Frequently asked questions

How do you convert binary to decimal by hand?

Multiply each digit by 2 raised to its position, counting from 0 on the right, and add: 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 13. To go from decimal to binary, divide by 2 repeatedly and read the remainders from the last to the first.

Why does −1 become 11111111?

Computers store negative integers in two’s complement: invert the bits of the positive value and add 1. In 8 bits, 1 is 00000001; inverted it is 11111110, plus 1 gives 11111111. The same bits read as unsigned are 255.

Is there a size limit?

The tool uses arbitrary-precision integers (BigInt), so numbers far larger than 64 bits convert exactly, up to 2,000 digits. Fractions are not supported: only whole numbers.

Embed this tool

Add this free tool to your own website — copy the code below. It stays up to date automatically.

Tools for your site →

More in Developers

Developers · Browse all 122 free tools