Number Base Converter
Convert between binary, octal, decimal & hex
Enter a value in any base and see the other bases update first; advanced scenarios and error guidance are available in Advanced mode.
——base 10The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.
About this tool
Convert signed integers between binary, octal, decimal, and hexadecimal with exact BigInt arithmetic. Enter the value in its source-base field to update the others. This is an integer converter without fractions, fixed-width padding, or two’s-complement interpretation.
Scenario Recipes
Inspect a large hexadecimal ID
Goal: Keep an integer exact while changing its representation.
- Enter 9007199254740993 in the Decimal field.
- Confirm Hexadecimal is 20000000000001.
- Enter 102 in Binary and confirm invalid input clears derived results.
Result: The conversion uses integer arithmetic and does not infer a protocol bit width.
Failure Clinic (Common Pitfalls)
Fixed-width modes are not available
Cause: FF is treated as positive 255; there is no signed int8 selector or padding setting.
Fix: Interpret byte width and two’s-complement values in a protocol-aware tool.
Production Snippets
Example
text
-0xFF in Hexadecimal → -255 in DecimalFrequently Asked Questions
Which number forms are supported?
Signed integers in bases 2, 8, 10, and 16 are supported. Matching 0b, 0o, and 0x prefixes are accepted in their respective fields, including -0xFF. Spaces are removed. Fractions, scientific notation, and a leading + are not supported.
Will a large ID lose precision?
Conversion uses BigInt integer arithmetic rather than JavaScript floating-point Number. For example, decimal 9007199254740993 becomes hexadecimal 20000000000001 without rounding. Browser memory and processing time still limit extremely long inputs.
Does FF mean -1 in this tool?
No. Hexadecimal FF converts to decimal 255. Negative values keep a minus sign, so -FF becomes -255; there is no fixed-width or two’s-complement mode. Bit length describes the magnitude, not a protocol field width.
What happens after an invalid digit?
An invalid source such as binary 102 is marked Invalid and the other fields and summary are cleared. Choose the correct source field and fix its digits before copying a conversion.
Keep browsing