Handy Orchard

Number base converter

Convert signed integers exactly between bases 2–36, including values larger than JavaScript’s safe integer range.

Your input

Up to 1,000 digits; letters A–Z mean 10–35. Choose the source base explicitly; prefixes such as 0x are not stripped.

Outputs are cleared when the input changes.

Result

Enter your data or use the example, then run the tool.

Worked example

FF in base 16 is 255 in base 10 and 11111111 in base 2.

9007199254740993 can be converted and converted back without passing through Number.

Method

Validate every digit against the selected base and accumulate the integer using BigInt multiply-and-add.

Repeated division and remainders produce target digits. A leading minus applies to the entire integer; no machine word width is assumed.

Limits

Integers only, with at most 1,000 input digits. No fractions, decimal points, scientific notation, separators or expressions.

No two’s-complement interpretation and no prefix inference. Upper- and lowercase letters are equivalent.

Sources

MDN: BigInt integer arithmetic

Related tools

Fraction arithmeticInteger factor toolkitSignificant figure roundingBitwise operation lab

Your inputs stay on this device. Only optional, consented page visits are measured. Input values, files, filenames and processing logs are not sent to Analytics.

When switching languages, text, settings and selected files are temporarily kept on this device. Transfers are removed after restoring; interrupted transfers are cleaned up on a later visit. Inputs and files are never uploaded.