Number Base
Express an integer in a selected base such as binary, octal, decimal or hexadecimal. This is useful for comparing programming notation, not for arbitrary-precision integer arithmetic.
- Runs in your browser
- Nothing is uploaded
- No signup; device limits apply
Loading the tool. If it does not appear, reload this page.
How to use this tool
Choose the source and destination bases and enter the number. Prefixes such as 0b, 0o and 0x can take precedence, so keep the selected base consistent with any prefix.
Results and examples
Decimal 255 is ff in hexadecimal and 11111111 in binary. Invalid trailing characters may leave only a partially parsed value, so verify the entire input rather than accepting any displayed result.
Limitations
- JavaScript Number precision is limited beyond the safe-integer range of 2^53−1.
- Fractional-base and arbitrary-length BigInt conversion are not implemented.
Fields
| Field | Guidance and constraints |
|---|---|
| Input base | Check the unit and format displayed beside this field. |
| Value | Check the unit and format displayed beside this field. |
Data handling
Processing stays in the current browser tab; the site does not upload tool input for the calculation itself.
Sources
Frequently asked questions
How does 255 look in other bases?
Decimal 255 is ff in hexadecimal and 11111111 in binary. Invalid trailing characters may leave only a partially parsed value, so verify the entire input rather than accepting any displayed result.
Are very large integers exact?
JavaScript Number precision is limited beyond the safe-integer range of 2^53−1. Fractional-base and arbitrary-length BigInt conversion are not implemented.