Number Base Converter

Convert between binary, octal, decimal, hexadecimal and any base.

About the base converter

Type a number into any field and the others update instantly β€” binary, octal, decimal, hexadecimal, plus any base from 2 to 36. Underneath you get the bit and byte width, and the Unicode code point and ASCII character where the value corresponds to one.

Arithmetic uses JavaScript's BigInt, so very large values stay exact rather than losing precision the way ordinary floating-point numbers do past 2⁡³.

What the common bases are for

  • Binary (base 2) β€” how computers actually store everything. Useful for bit flags, permissions and masks.
  • Octal (base 8) β€” mostly survives in Unix file permissions, where chmod 755 is three octal digits.
  • Decimal (base 10) β€” ordinary human numbers.
  • Hexadecimal (base 16) β€” the compact way to write binary, since one hex digit is exactly four bits. Colours (#FF8800), memory addresses, byte dumps and Unicode code points all use it.

Frequently asked questions

How do I convert binary to decimal?

Type or paste the binary digits into the binary field and read the decimal field. Prefixes like 0b are accepted and ignored, as are spaces and underscores used as digit separators.

What is 0xFF in decimal?

255. Two hexadecimal digits cover 0 to 255, which is exactly one byte β€” the reason hex is used so widely for colour channels and byte values.

Why is hexadecimal used so much in programming?

Because one hex digit maps to exactly four binary digits, so hex is a compact, readable stand-in for binary. Converting between the two is mechanical, unlike decimal.

Can it handle very large numbers?

Yes. Conversion uses BigInt arithmetic, so values far beyond the usual 64-bit range convert exactly with no rounding.