Number Base Converter

Convert a number between binary, octal, decimal and hexadecimal at once. Edit any field and the others update live. Supports large numbers with no loss of precision (BigInt).

Number bases in programming

The same number can be written in different bases. Decimal (base 10) is the everyday one; binary (base 2) is the native language of computers; hexadecimal (base 16) is compact and common in colors, memory addresses and bytes; octal (base 8) shows up, for example, in Unix file permissions (chmod 755). Converting between them is a frequent task for developers.

How to use

Type the number into any of the four fields. The other three are filled in automatically. Each field only accepts the valid digits for its base — if you type, for example, a 2 in the binary field or a g in the hexadecimal field, a readable error message appears. A minus sign for negative numbers is also accepted, as well as _ or space as visual separators.

Large numbers

The conversion uses BigInt, JavaScript's arbitrary-precision integer type. This means numbers with dozens of digits are converted without rounding — something that would happen if we used the regular numeric type, limited to about 15–16 significant digits.

Frequently Asked Questions (FAQ)

Does it work with fractional numbers?

No. The tool converts integers (including negative ones). Fractions in different bases involve additional rules and are out of scope here.

Does the hexadecimal output use uppercase or lowercase?

The output uses lowercase (ff), but on input it doesn't matter — you can type FF or ff.

Why did the field go blank when I erased everything?

When you clear a field, the others are reset to avoid showing a "stuck" value that no longer corresponds to what you typed. Use "Clear" to reset all of them at once.