Number Base Converter
Convert a number between any two bases from 2 to 36 and see every common base at once. Arithmetic runs on arbitrary-precision integers, so a 64-bit hash or a 128-bit identifier round-trips exactly instead of quietly losing its low bits.
Hexadecimal3,735,928,559 decimal · 32 bits · fits u32
Arbitrary precision, not doubles. Converting a 64-bit hash in a calculator built on JavaScript numbers silently loses the low bits past 253: 9007199254740993 comes back as …992, with nothing on screen to say so. This uses BigInt throughout, so a 128-bit value round-trips exactly. .
Common questions
- Why do other base converters get large numbers wrong?
- Because they convert through a JavaScript number, which is a 64-bit float and can only represent integers exactly up to 2^53 − 1. Paste a 64-bit hash into one and the low digits come back changed, with no warning. The tool has silently rounded. This converter uses BigInt end to end, so 2^53 and 2^53 + 1 are distinguishable and a 128-bit value survives the round trip intact.
- Which bases are supported?
- Every base from 2 to 36, using the digits 0–9 then A–Z. Binary, octal, decimal and hexadecimal are shown together on every conversion since those are what people usually want side by side; base 36 is included because it is the most compact base expressible in alphanumerics, which makes it useful for short identifiers.
- Can I paste a value with a 0x or 0b prefix?
- Yes. A leading 0x, 0b or 0o sets the base automatically, so you can paste straight from source code or a debugger. Underscores and spaces are accepted as digit separators and ignored, so 0xDEAD_BEEF and 1010 1010 both parse, and case does not matter.
- What does the bit width tell me?
- How many bits the value actually needs, and therefore which fixed-width integer types it fits. The tool reports whether the number fits u8, i8, u16, i16, u32, i32, u64, i64 or u128, which is the question you usually have when converting: not what the hex is, but whether it will fit in the column or the register you are about to put it in.
- How are negative numbers handled?
- A leading minus sign is accepted and the magnitude is converted, so −255 becomes −FF in hex. That is mathematical base conversion rather than two's-complement encoding, which is a different operation and depends on a chosen width. The tool notes the two's-complement representation separately where a width is implied, so the two are never confused.
- Is there a limit on how large a number I can convert?
- Only your device's memory. Numbers with hundreds of digits convert exactly and quickly. There is no imposed cap because nothing is being sent anywhere and no server is paying for the computation.
Exact. Every conversion runs on arbitrary-precision integers, so values of any size round-trip without losing a digit.