Convert a nonnegative whole number between binary, octal, decimal, and hexadecimal by editing any of the four fields.
Inputs and checks
Choose any of the four fields and type a whole number; the other three update as you type, without a Convert button.
Binary accepts 0 to 1, octal 0 to 7, decimal 0 to 9, and hexadecimal 0 to 9 and A to F. Letter case does not matter for input; hexadecimal results use uppercase letters.
Do not type a minus sign, decimal point, 0x or 0b prefix, or another number base. Spaces before or after the entry are ignored.
There is no stated maximum, but enter a nonnegative integer. Each field uses digits, not physical units.
Reading the result
All four fields represent the same integer in different bases; a digit changes value depending on its place and base.
An invalid entry marks that field without replacing the other three values. Clearing a field also leaves the previous conversions visible.
Examples
Convert decimal 255
Input
Decimal field: 255
Result
Binary: 11111111; octal: 377; hexadecimal: FF
How to check it
In binary, 255 = 128+64+32+16+8+4+2+1. In hexadecimal, FF means 15×16+15.
Convert hexadecimal 2A
Input
Hexadecimal field: 2A
Result
Decimal: 42; binary: 101010; octal: 52
How to check it
2A in base 16 means 2×16+10=42; 52 in base 8 means 5×8+2=42.
Frequently asked questions
Can I convert a negative number or decimal fraction?
No. This page converts nonnegative whole numbers only.
Why did the other fields stay unchanged?
An invalid or empty entry does not replace earlier conversions. Enter digits allowed for the selected base.
Can I enter 0x2A?
No. Select the hexadecimal field and enter 2A without the 0x prefix.