Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36, with big-number and two's-complement support.
0 uses the usual grouping for each base: 4 for binary, 3 for octal and decimal, 2 for hexadecimal. Grouping is applied to the boxes you are not typing in.
Two's complement
How this number is stored in a fixed-width integer. Negative values wrap around; values that are too large are flagged.
| Width | Binary | Hex |
|---|
Try an example
How to use the base converter
- Type a number into any box — binary, octal, decimal, hexadecimal or your own base from 2 to 36 — and every other box updates instantly.
- Prefixes are understood, so
0xFF,0b1010,0o17, spaces and underscores can all be pasted straight in. - Read the two's-complement table on the right to see how the value is stored as an 8, 16, 32 or 64-bit integer.
FAQ
How big a number can it handle?
Any whole number. Conversion uses JavaScript BigInt, so a 200-digit decimal or a 512-bit hex value converts exactly, with no floating-point rounding.
What does the two's-complement table show?
The bit pattern a CPU would actually store. -1 becomes FF in 8 bits and FFFFFFFFFFFFFFFF in 64 bits; a value that cannot be represented in that width is marked as not fitting.
Can I convert fractions?
Not yet — this converter works on whole numbers, positive or negative. Digits after a decimal point are rejected instead of being silently rounded.