Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal, and any custom base...Convert numbers between binary, octal, decimal, hexadecimal, and any custom base from 2 to 36, with a live bit view, two's complement, and exact BigIn...
Updated
Convert a number between bases
Bit view
8 bitsTwo's complement (signed, fixed width)
255 does not fit in a signed 8-bit integer (range -128 to 127); the pattern below is the wrapped value.
Quick examples
Number base reference
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 64 | 1000000 | 100 | 40 |
| 255 | 11111111 | 377 | FF |
Quick answer
To convert between binary, decimal, and hex, type your number into any field and the others update at once. Decimal 255 is binary 11111111, octal 377, and hexadecimal FF, because each hex digit maps to exactly four binary bits. This converter runs entirely in your browser and uses BigInt, so it stays exact even for very large numbers: decimal 12345678901234567890 is hex AB54A98CEB1F0AD2 with no rounding. It also shows the grouped bit view, the bit width, a signed two's complement pattern at 8, 16, 32, or 64 bits, and conversion to any custom base from 2 to 36.
Converter Features
Why Use Number Base Converter?
Every Base at Once
Type in binary, octal, decimal, or hex and the other three update live. A fifth field converts to any custom base from 2 to 36 at the same time.
Live Bit View
See the binary grouped into nibbles like 0100 1101, with the exact bit width shown, so you can read a byte or a register value at a glance.
Exact BigInt Math
Big values are handled with BigInt, so a 20-digit number converts to hex with zero rounding. No silent precision loss past 2 to the power 53.
Two's Complement View
Read the signed 8, 16, 32, or 64-bit two's complement pattern for any value, clearly labelled, with an overflow note when a number will not fit the width.
Friendly Digit Checks
Type a 2 in the binary field or a G in hex and the tool names the bad digit instead of silently guessing, so you fix the input in one read.
100% In Your Browser
Every conversion runs on your device with JavaScript BigInt. No number you type is ever uploaded, logged, or sent to a server.
Common Uses for the Base Converter
Programming and Debugging
Read hex color codes, bit flags, and memory addresses as decimal or binary while you work.
Unix File Permissions
Type 755 in the octal field to see the binary rwxr-xr-x pattern behind a chmod value.
Embedded and Firmware
Inspect register values and masks with the bit view and the fixed-width two's complement panel.
Computer Science Study
Check homework on radix conversion, signed integers, and two's complement against exact answers.
How It Works
Type a number in any base
Enter a value in the binary, octal, decimal, or hex field. The field you are editing is highlighted and the others convert instantly.
Read every base together
See binary, octal, decimal, hex, and your chosen custom base side by side, plus the grouped bit view and the two's complement pattern.
Copy the value you need
Press Copy next to any base to put that exact representation on your clipboard, ready to paste into code, a config file, or a calculator.
Tips and Best Practices
Read Bytes in Nibbles
The bit view groups binary in fours, so 0100 1101 reads as two hex digits (4 and D). Once you see the nibble split, converting hex to binary in your head becomes trivial.
Use the Custom Base for Base 32
Set the custom base to 32 to work with base 32 style values, or to 36 for the shortest alphanumeric form. Changing the base reconverts the current value instead of clearing it.
Pick the Right Width for Signed Values
Two's complement depends on the bit width. -1 is 11111111 at 8 bits but 1111111111111111 at 16 bits, so choose the width that matches your data type before you read the pattern.