Convert an integer beyond ordinary number precision
Input and settings
Input: 9007199254740993 / From: base 10 / To: base 16
Expected result
20000000000001
Convert whole numbers exactly between bases 2 through 36, including binary and hexadecimal.
These are example steps; replace the values for your task.
Whole numbers are parsed with BigInt, avoiding the precision loss that normal JavaScript numbers can introduce for large values. Negative integers are supported.
Fractions, prefixes such as 0x, and digit separators are not accepted. Bases above ten use lowercase letters in output.
Represent large or negative integers in another base without losing integer digits.
Example buttons replace the inputs and settings above and calculate. Restore previous input steps back one example at a time. After trying multiple examples, repeat restore to return to your original input. This history is lost when the page closes.
Input: 9007199254740993 / From: base 10 / To: base 16
20000000000001
Input: -FF / From: base 16 / To: base 10 Do not add 0x.
-255
The first example uses BigInt integer arithmetic to preserve 9007199254740993 exactly. Negative values use a leading minus sign. Input letters are case-insensitive and output letters are lowercase. Leading zeroes are normalized as part of the number.
The UI offers bases 2, 8, 10, 16 and 36. Fractions, exponents, digit separators, prefixes such as 0x and two’s-complement interpretation are unsupported. Outer whitespace is trimmed; internal whitespace is invalid. Very long input depends on device processing time and memory.
Verification: existing convertBase and parseBase checks cover a large-integer round trip, -FF→-255 and rejection of invalid digits, fractions and prefixes, compared with rendered output.
With base 16 as the source, ff becomes 255 in decimal or 11111111 in binary.
Each digit updates the accumulated value as previous value × base + digit. The integer is held as a BigInt.
Valid digits depend on the source base. For example, entering 2 in base 2 produces an error.
Decimal 9007199254740993 converts to hexadecimal 20000000000001. Converting it back restores the original integer. Decimals and a 0x prefix are rejected: select base 16 and paste only the digits.
Yes. BigInt preserves digits beyond the normal safe-integer range.
No. This tool handles whole numbers only.
No. Enter the digits only.
Share only the tool name and public URL. Your input and results are not included.
Keep any content you need before clearing. This tool does not autosave inputs or results. Reloading or closing the page, clearing inputs or resetting may discard your work.
Favorites and language preferences are stored separately and may be lost when site data is cleared. Tool resets and site-data deletion do not delete files already downloaded to your device.