Number Base Converter
Convert between binary, octal, decimal and hex with exact 64-bit+ precision.
About this tool
Type a number in any row and the other bases update as you type: binary, octal, decimal, hex, plus a custom base up to 36. Prefixes (0x, 0b, 0o, #) and digit separators are accepted on input, and outputs can group digits the conventional way: binary and hex in fours, decimal with thousands commas.
The math runs on BigInt, so converting a 64-bit memory address or a snowflake id is exact; ordinary JavaScript tools silently lose precision past 2^53. Negative values keep their minus sign in every base rather than switching to two's complement, which depends on a bit width and is a different question. Everything computes in your browser as you type.
Frequently asked questions
- How large a number can this handle?
- Arbitrary size. Conversion runs on BigInt arithmetic, so 64-bit values like memory addresses and snowflake ids convert exactly, with no rounding at 2^53 the way ordinary JavaScript numbers do.
- Are negative numbers shown in two's complement?
- No. Negative values keep a minus sign in every base. Two's complement depends on a chosen bit width, which is a different question than base conversion.
- Can I paste values with prefixes or separators?
- Yes. 0x, 0b, 0o and # prefixes are stripped when they match the field, and spaces, underscores and commas are ignored, so 0xDEAD_BEEF and 1,000,000 both parse.