Binary / Decimal / Hex Converter

Convert a whole number exactly between binary, decimal and hexadecimal.

Input base

Type digits only, with an optional minus or plus sign. Do not add 0b or 0x, because the input base is chosen above.

How it works

This tool converts a whole number between binary, decimal and hexadecimal. It reads the digits as an exact whole number (BigInt) and never turns the value into an ordinary floating point number, so results stay exact for numbers of any practical size.

A minus or plus sign is allowed at the front. Negative numbers keep their minus sign, so decimal -10 is binary -1010 and hexadecimal -A. This is not two's complement, which needs a fixed number of bits. Hexadecimal output uses capital letters A to F, and input accepts either case. Spaces, commas and underscores inside the number are refused, not removed. Input is limited to 1,000 characters.

What this result means

The result is your number converted exactly between binary, decimal and hexadecimal.

Examples

  • 26 (decimal): binary 11010, hexadecimal 1A

Assumptions and limitations

  • Whole numbers only. There is no octal and no fixed width two's complement form.

Analytics only runs if you choose to allow it below. Advertising and affiliate tracking are not currently used on Numerila. This panel exists so your preference is on record for if that ever changes.