2026-10-03

A Binary, Hex and Octal Converter with BigInt Precision and Two's Complement

A quick base conversion sounds trivial until the number is a 64-bit ID or a hash fragment. Plain JavaScript numbers are 64-bit floats and silently lose exactness above 9,007,199,254,740,991, so a converter that is built on them, or on parseInt, can hand back a wrong answer without any warning. The Number Base Converter is built on BigInt, which is exact at any size.

A concrete example

Enter FFFFFFFFFFFFFFFF in base 16. The decimal result is 18446744073709551615, which is 2^64 - 1. A float-based converter would round that to 18446744073709552000. For memory addresses, bitmasks and 64-bit identifiers, that difference matters.

Two's complement, side by side

Debugging signed integers usually means asking what a negative value looks like in memory. Enter -1 and the tool shows 11111111 (FF) at 8 bits, FFFF at 16 bits, and so on up to 64 bits. If a value does not fit in a width, the tool says so instead of showing a truncated pattern.

Beyond the usual four bases

Any base from 2 to 36 is available. Base 36 turns up in short IDs and URL shorteners; base 32 and base 12 show up in niche formats. Input accepts 0x, 0b and 0o prefixes, a leading minus sign, and underscores or spaces between digits, so you can paste values straight from source code.

How it compares

The calculator app on your computer. Programmer modes are convenient and offline, and are a good choice for a quick check at a fixed word size. They usually cover only the four common bases and do not show several widths at once.

Language consoles. Python's int(x, base) and bin()/hex() are exact and scriptable, and if you already have a terminal open, that is the most flexible option. This page is for when you do not want to open one, or want every base and width in one view.

Floating-point values. This tool is integer-only. For the IEEE 754 layout of a float, use a dedicated float inspector.

Verdict

For quick, exact conversions with copy buttons and a two's complement view, try the Number Base Converter. If you are decoding encoded data rather than numbers, the Base64 Encoder and Hash Generator cover that side.

Try Number Base Converter · More guides · All tools