Input
Result
The result will appear here.Your runs
Only runs that cost points are saved.
Sign in to keep a history of your runs.
Converts between any two bases from 2 to 36 using arbitrary-precision arithmetic, so a 64-bit identifier in hex converts exactly instead of silently losing its low digits the way parseInt does past 2^53. Useful for reading permission masks, colour values, database identifiers and anything that arrives as hex in a log line.
How it works
- Arithmetic uses BigInt, so precision does not depend on the size of the number.
- Digits are validated against the source base, and an invalid digit is named rather than silently ignored.
- The decimal value and bit width are shown alongside the conversion.
Where your data goes
Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.
When a run costs points, a one-line summary is saved to your own history so you can find it again. The summary records the shape of the run — sizes, counts, the values you looked up — never the content you pasted.
What it costs
This tool is free, with no sign-in and no points.
Common questions
- Why does JavaScript's parseInt give me a different answer?
- parseInt returns a double, which holds only 53 bits of integer precision. Anything longer than about 16 hex digits is rounded. This tool uses BigInt and does not round.
- How do I convert a negative number to binary?
- This tool shows a sign and the magnitude. Two's-complement representation depends on a word width — 8, 32, 64 bits — which is a property of your system, not of the number.
- What is base 36 for?
- Digits plus the whole Latin alphabet, which makes it the most compact case-insensitive encoding of a number. Short link services and identifier schemes use it.
The open-source behind it
This tool is a self-contained implementation. MikeMcl/bignumber.js (MIT) does the same job as a library — if you need this behaviour inside your own program, start there rather than calling a web page.
MikeMcl/bignumber.jsAlso known as
- hex to decimal
- binary converter
- base converter
- decimal to hex
- number base conversion