Skip to main content

Accurately convert binary, octal, decimal, hexadecimal and base 2–36 integers. Supports positive and negative numbers and large integers, strictly checks each digit, and provides quick selection of commonly used bases.

Only integers and optional signs are supported, not decimals, 0x/0b prefixes, or thousands separators. Maximum 1024 input characters.

16 / 1,024 characters

Shortcut key: Ctrl/⌘+Enter. Modifying inputs or options clears old results.

Instructions for use

  1. Enter an integer without the 0x/0b prefix and confirm the base.
  2. Select the target base system, or use common conversion shortcuts.
  3. Copy the result; when converting in reverse, both the base and the input result are swapped.

Input and output examples

Example input
FF, hexadecimal → decimal
Example output
255

The value of F is 15, so FF = 15 × 16 + 15. All output letters are in uppercase letters.

FAQ

The base is already specified by the options, so input only requires FF. The tool rejects prefixes, delimiters, and numbers that do not belong to the base, and does not read only legal beginnings like relaxed parsing.

Currently only integers and optional signs are supported, up to 1024 input characters. Decimal conversion involves loop unrolling and is outside the scope of current capabilities.

Calculation basis and reference materials

Accumulate each digit according to the base to get an integer, and then output the target base; use BigInt to avoid losing large integer precision through floating point numbers. Supports positive and negative integers in hexadecimal 2-36, and does not handle decimal places.

Content check: · About this site and content description

Related tools