About the Number Base Converter tool
Programmers, electronics students and anyone preparing for a computer science exam constantly switch between number systems. A colour value is written in hex, file permissions in octal, a register in binary and everything else in decimal. This number base converter shows the same value in binary, octal, decimal, hexadecimal and one custom base of your choice at the same time, and every box is editable.
Type into any field and the others update instantly, with no convert button to press. Inputs can include prefixes such as 0x, 0b and 0o, and spaces or underscores used for readability. Because the tool uses JavaScript BigInt arithmetic, it handles numbers far larger than 64 bits without losing precision, which ordinary calculators and many online converters quietly get wrong.
Negative numbers get special treatment. Alongside the signed values you will see the two's-complement bit pattern for 8, 16, 32 and 64-bit integers, which is how processors and languages like C, Java and Go really store them. The custom base goes from 2 up to 36 using digits 0–9 and letters A–Z. Everything is calculated in your browser.
How to use Number Base Converter
- Type a number into the Decimal, Hexadecimal, Binary or Octal box. The other boxes update as you type.
- Choose any base from 2 to 36 under “Custom base” to see the value in that system, or type directly into it.
- Turn on “Group digits for readability” to split binary into nibbles, hex into bytes and decimal into thousands.
- For negative values, read the two's-complement patterns for 8, 16, 32 and 64 bits on the right.
- Use the copy icon next to any field, or click “Clear” to start again.
Features
Five bases updating together
Binary, octal, decimal, hex and a custom base stay in sync whichever one you edit.
Arbitrary precision
BigInt maths converts huge integers exactly, with no rounding at 2^53 like normal JavaScript numbers.
Two's complement view
See how a negative number is stored in 8, 16, 32 and 64-bit signed integers, in binary and hex.
Forgiving input
Accepts 0x, 0b and 0o prefixes, underscores and spaces, and flags invalid digits clearly.
Any base from 2 to 36
Work with base 3, base 12, base 32 or base 36 identifiers using letters A–Z as digits.
When to use it
- Check homework or exam answers for binary, octal and hexadecimal conversions.
- Convert a hex memory address or error code from a log into decimal.
- Work out the 8-bit pattern of a negative sensor reading for an Arduino or embedded project.
- Translate Unix permission bits like 755 between octal and binary.
- Decode base-36 short IDs used in URLs and databases.
Frequently asked questions
How do I convert binary to decimal?
Type or paste the binary digits into the Binary box and the decimal value appears immediately in the Decimal box. Each binary digit is multiplied by a power of two and the results are added.
What is two's complement?
It is the standard way computers store negative integers. To get it, invert all the bits of the positive number and add one. For example −5 in 8 bits is 11111011, shown here as 0xFB.
How large a number can I convert?
There is no fixed limit because the tool uses BigInt. Numbers with hundreds of digits convert exactly, though extremely long inputs may make typing feel slower.
Can I convert fractions or decimals like 10.5?
No. This converter works with whole numbers (integers) only, positive or negative.
Why does a value say “out of range” for 8 bits?
The 8-bit row accepts values from −128 (the signed minimum) up to 255 (the unsigned maximum). Numbers outside a width’s range cannot be represented in that many bits.