schwapps.
← All toolsDeveloper / 28

Number base converter

Convert signed whole numbers between binary, octal, decimal, and hexadecimal.

Loading the tool… JavaScript is required for processing on your device. The instructions and examples below are available without JavaScript.

How to use it

Enter a whole number and choose its source and destination base.

Good to know

Uses BigInt, so large integers are not rounded.

Change a whole number’s notation

Choose the source and destination bases, then enter the number without a prefix. For example, FF from hexadecimal to decimal becomes 255. Negative values are allowed, so decimal -10 becomes binary -1010.

Use the correct digits for the selected base

Binary accepts 0 and 1; octal accepts 0–7; decimal accepts 0–9; hexadecimal additionally accepts A–F. The converter uses exact integer arithmetic, so it does not round large whole numbers.

Fractions, prefixes such as 0x, scientific notation, and decimal points are not accepted. Enter at most 1,000 digits. For text encoded as binary bytes, use the binary translator instead.