Number Base Converter
Convert signed integers between binary, octal, decimal, and hexadecimal without losing precision.
Numbers are converted locally using BigInt. Nothing is transmitted.
Number input
No prefixes, digit separators, or internal whitespace. A leading minus sign is supported.
How number base conversion works
Each base defines a set of digits and a place value. Binary uses 0–1, octal 0–7, decimal 0–9, and hexadecimal 0–9 plus A–F. The tool parses the source representation into an exact BigInt and serializes that integer in each target base.
Large integers
JavaScript Number loses integer precision beyond 9,007,199,254,740,991. This converter uses BigInt, so large integers remain exact within the input length limit.
Frequently asked questions
Does a leading zero change the value?
No. Leading zeroes are valid digits and do not affect the numeric value, although they are not added to the output.
Is a negative binary value two's complement?
No. It is a signed magnitude with a minus sign. Two's complement requires an explicit bit width and is outside this MVP.
Why are 0x prefixes rejected?
The base is selected explicitly, so prefixes would be ambiguous. Select Hexadecimal as the source base instead.