Free online tools

Number Base Converter

Change the base of an integer copied from a specification, log or worksheet. Choose both bases explicitly and copy the result with every digit preserved.

Enter your values

Use ASCII digits and letters. Binary, octal and hexadecimal accept their corresponding 0b, 0o and 0x prefixes.

This tool processes your input in your browser.

Result

Read binary, decimal and hexadecimal values

Choose the source base used by your document, then choose the output base. Base 2 uses 0 and 1, base 10 uses 0 through 9, and base 16 also uses A through F. A leading minus sign marks a negative integer.

Keep every digit of a large integer

The conversion uses arbitrary-precision integers. The example 0x20000000000001 becomes 9007199254740993 in decimal. If you paste that result into software with floating-point numeric fields, choose a text field to retain the exact spelling.

Frequently asked questions

Can I enter a fractional value?

Use whole integers. An input can begin with a plus or minus sign and contain up to 8,192 digits.

Why does a digit fail validation?

Each digit must represent a value below the selected source base. For example, an octal input can use 7, and 8 requires a larger base.

Will the converter keep leading zeros?

The copyable result uses the shortest spelling of the integer in the destination base. Add any leading zeros required by your destination’s field width.