Number Base Converter
Convert signed integers between binary, octal, decimal and hexadecimal. Paste long values without losing low-order digits and copy all four representations.
- Choose the source base
- Enter the digits
- Check all four forms
Convert the integer
- Choose the source base
- Example
- Decimal
Choose the source base
Use the base in which the digits are already written.
- Enter the digits
- Example
- 255
Enter the digits
Omit language prefixes such as 0x. A leading plus or minus is accepted.
- Check all four forms
- Example
- Hexadecimal FF
Check all four forms
Read the same integer under each base label before copying.
Read a byte value
Eight set bits represent the largest unsigned value in one byte. In hex those bits form two groups of four, so the same value reads FF.
- 255 decimal
- 11111111 binary
Preserve a long integer
The low-order one survives conversion because the calculation uses whole-number arithmetic. Floating-point spreadsheets or scripts may round this value when you paste it back.
For text or binary files represented in Base64, use the Base64 encoder and decoder.
- 20000000000001 hex
- 9007199254740993 decimal
Choose a number representation
Signed values
Minus signs remain explicit in every base. A fixed-width two's-complement field requires knowing its word width.
Leading zeros
Leading zeros do not change the integer and disappear from the result. Add padding separately if a protocol requires a fixed length.
| Input | Result |
|---|---|
| 255 decimal | 11111111 binary |
| 20000000000001 hex | 9007199254740993 decimal |
Where are your records processed?
Digits are converted in this tab. Copy result writes the four representations to your clipboard when you choose it. Privacy policy.
- Choose the source base
- Enter the digits
- Check all four forms
Number Base Converter questions
Do lowercase hex letters work?
Yes. Output uses uppercase A through F for consistency.
Can I enter a fractional binary value?
The input accepts whole numbers only.
Why does 102 fail in binary?
Base two has only zero and one. Choose the correct base or fix the digit before converting.