Number Base Converter
Convert signed integers exactly between binary, octal, decimal and hexadecimal using BigInt. Input is validated against the selected base, with a limit of 4,096 digits.
Parameters
Enter the number to convert (digits valid for the selected base)
The base of the input number
Results
255
Decimal representation
Other results (5)
1111 1111
Binary representation with 4-bit grouping
377
Octal representation
0xFF
Hexadecimal representation with 0x prefix
Number of bits required to represent this number
0xFF
Single-byte hex representation
Example input and result
2551111 1111Integer input only, up to 4,096 digits. Negative values use a minus sign; this is not a fixed-width two’s-complement representation.
Why Choose Number Base Converter
Convert signed integers exactly between binary, octal, decimal and hexadecimal using BigInt. Input is validated against the selected base, with a limit of 4,096 digits.
How to Use
- 1Enter a signed integer using valid digits for the source base.
- 2Select binary, octal, decimal or hexadecimal as the input base.
- 3Copy the converted integer; binary output includes four-digit groups.
Frequently Asked Questions (FAQ)
Can I convert an integer larger than the JavaScript safe range?
Yes. BigInt preserves integer values beyond 9,007,199,254,740,991. Fractions and scientific notation are not accepted; input is limited to 4,096 digits.
How are negative numbers represented?
A minus sign is shown before the magnitude. For example, decimal -10 becomes binary -1010. This is not a fixed-width two’s-complement encoding.
Can I include a prefix?
The matching prefixes 0b, 0o and 0x are accepted for binary, octal and hexadecimal. Digits outside the selected base and trailing text are rejected.
Authoritative References & Sources
MDN — BigInt
View SourceRelated Tools
Explore more practical tools for the same task.
