Number Base Converter
Type a number in any base and see it in binary, octal, decimal, hex and base 36 at once, plus its two’s complement in 8, 16, 32 and 64 bits. Numbers can be as large as you like.
Runs in your browser — nothing is uploaded.
Prefixes 0b, 0o, 0x override the base. A minus sign and “_” separators are fine.
In every base
Two’s complement
How the value is stored in a fixed-width integer. Values up to the unsigned maximum are accepted.
| Width | Binary | Hex | Unsigned | Signed |
|---|---|---|---|---|
How to use it
- Type or paste a number and pick its base. A prefix 0b, 0o or 0x sets the base for you.
- Copy any of the results. Tick “Group digits” to make long numbers easier to read.
- Check the table for how the value is stored as a signed or unsigned 8, 16, 32 or 64-bit integer.
Frequently asked questions
Is there a size limit?
No. It uses arbitrary-precision integers (BigInt), so 2^200 converts exactly. Only the memory of your browser limits it.
What are the prefixes?
0b for binary, 0o for octal and 0x for hexadecimal. Underscores, spaces and commas inside the number are ignored, and a leading minus sign is accepted.
What is two’s complement?
The way computers store negative integers: −1 in 8 bits is 11111111. The table shows the bit pattern of your number in each width, and how that pattern reads as signed and unsigned.
Why does a width say it does not fit?
The value is outside the range of that integer size, for example 300 in 8 bits (limit 255, or −128 to 127 signed).
What about fractions?
Only whole numbers are converted.