Binary and Hex Converter

Convert exact integers across four bases. Switch to text for UTF-8 byte conversion.

Up to 256 binary digits. Signs and matching 0b, 0o, 0x prefixes work. Whole numbers only.

binary101101
octal55
decimal45
hex2D
How the conversion works

101101 in binary is 32 + 8 + 4 + 1 = 45 in decimal.

What is a number base?

Binary uses 0 and 1; octal uses 0–7; decimal uses 0–9; hexadecimal uses 0–9 and A–F. The same integer has a different written form in each base. UTF-8 text is a sequence of bytes, so a letter may use more than one byte.

Updated