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).
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).
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.
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.
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.
No. The tool converts integers (including negative ones). Fractions in different bases involve additional rules and are out of scope here.
The output uses lowercase (ff), but on input it doesn't matter — you can
type FF or ff.
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.