TF

Converters

Number Base Converter: Binary, Octal, Decimal and Hex

Convert numbers of any size between binary, octal, decimal, hexadecimal, and any base from 2 to 36, with two's complement.

  • Binary (2)
    1111 1111
  • Octal (8)
    377
  • Decimal (10)
    255
  • Hexadecimal (16)
    FF
  • 73

Bit patterns (8 bits needed)

WidthTwo's complement
8-bit1111 1111
16-bit0000 0000 1111 1111
32-bit0000 0000 0000 0000 0000 0000 1111 1111
64-bit0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 1111 1111

What is this tool?

Enter a number in any base and see it in binary, octal, decimal, hexadecimal, and a base of your choice at the same time. Numbers can be as large as you like, prefixes such as 0x and 0b are detected automatically, and the bit table shows two's-complement patterns for signed values.

Conversion uses arbitrary-precision integers (BigInt), so even 100-digit numbers convert exactly with no rounding. Negative numbers keep their minus sign in every base.

Two's complement is how computers store signed integers: -1 in 8 bits is 11111111. The table shows whether a value fits each width and its exact bit pattern.

To convert text into binary or hex bytes, use the Encoder / Decoder instead — this tool converts numeric values.

How to use the Number Base Converter

  1. Type a number, or paste one with a 0b, 0o, or 0x prefix.
  2. Choose its base if it wasn't detected automatically.
  3. Read the result in binary, octal, decimal, hex, and a custom base from 2 to 36.
  4. Copy any value, and check the two's-complement table for 8-, 16-, 32-, and 64-bit patterns.

Examples

255 in other bases

255
Binary 11111111 · Octal 377 · Hex FF

Frequently asked questions

How do I convert binary to decimal?

Type the binary number (or prefix it with 0b) and read the Decimal row. Each binary digit is a power of two: 1011 is 8 + 0 + 2 + 1 = 11.

Which letters are used for bases above 10?

Digits 0–9 are followed by letters a–z, so hex uses 0–9 and A–F, and base 36 uses every digit and letter. Input is case-insensitive.

Are fractions supported?

No, the converter works with whole numbers. Fractions often have no exact representation in other bases.

Is there a size limit?

No practical limit — numbers with hundreds of digits convert instantly.

Want more power later?

Premium tools, higher limits, and API access are on the roadmap. V1 stays free and private in your browser.