Binary Converter

Convert between binary, decimal, hexadecimal and octal, or switch to Text ↔ Binary mode to encode and decode text.

Presets:
Base 2
Base 10
Base 8
Base 16
Conversions run locally in your browser.

What is a Binary Converter?

A Binary Converter helps you convert numbers between binary, decimal, octal, and hexadecimal. You can enter a value in one number system and see the equivalent value in the others.

The tool also includes a Text ↔ Binary mode. It can encode text as UTF-8 binary bytes or decode valid binary byte groups back into readable text.

  • Binary: Base 2, using only 0 and 1.
  • Decimal: Base 10, using digits 0 through 9.
  • Octal: Base 8, using digits 0 through 7.
  • Hexadecimal: Base 16, using digits 0 through 9 and letters A through F.

How to Use the Binary Converter

Choose the mode that matches what you want to convert.

Convert Binary, Decimal, Octal, or Hexadecimal

  1. Choose a field: Enter a value in the Binary, Decimal, Octal, or Hexadecimal field.
  2. Type your number: Use only the digits allowed by that number system.
  3. View the conversions: The equivalent values appear in the other number fields.
  4. Copy a result: Use the copy action beside the value you need.

Convert Text and Binary

  1. Open Text ↔ Binary: Switch to the text conversion mode.
  2. Choose a direction: Select Text → Binary or Binary → Text.
  3. Choose a separator: Use spaces, commas, dashes, or no separator if the option is available.
  4. Enter your value: Add text or binary data and copy the converted result.

Binary Conversion Examples

The same number can be written differently depending on the number system. These examples show equivalent values in binary, decimal, octal, and hexadecimal.

Decimal Binary Octal Hexadecimal
0 0 0 0
1 1 1 1
2 10 2 2
8 1000 10 8
10 1010 12 A
15 1111 17 F
16 10000 20 10
32 100000 40 20
255 11111111 377 FF

Text can also be represented as binary bytes. For example, A is 01000001 in UTF-8, while Hi becomes 01001000 01101001.

Understanding Binary, Decimal, Octal, and Hexadecimal

Binary

Binary is a base-2 number system that uses only 0 and 1. Each position represents a power of 2. Binary is widely used in digital electronics and computer systems.

Decimal

Decimal is the base-10 number system used in everyday arithmetic. It uses digits from 0 to 9.

Octal

Octal uses base 8 and digits from 0 to 7. One octal digit can represent three binary bits, which makes some binary values easier to read. Octal values are also commonly seen in Unix-style file permissions such as 755.

Hexadecimal

Hexadecimal uses base 16. It includes digits 0 through 9 and letters A through F. One hexadecimal digit represents four binary bits, so hexadecimal is a compact way to display binary values.

Text and Binary Conversion

Text must be encoded into bytes before it can be represented as binary. This converter uses UTF-8 for text conversion.

Basic ASCII characters such as English letters and numbers use one UTF-8 byte. For example, the letter A uses the byte value 65, which is written as 01000001 in binary.

Many other Unicode characters use more than one UTF-8 byte. Each byte is shown as its own 8-bit binary group. This is why an emoji, accented character, or character from another writing system can produce several binary groups.

Use cases for a Binary Converter

Number-base conversion is useful when working with software, electronics, networking, permissions, and computer science exercises.

  • Programming: Compare binary flags, decimal values, hexadecimal constants, and bitmasks.
  • Web and software development: Inspect numeric values represented in different bases.
  • Unix permissions: Understand octal values such as 644 and 755.
  • Networking and electronics: Read values represented as bits, bytes, or hexadecimal numbers.
  • Learning: Compare the same value across common number systems while studying binary arithmetic.

Large Number Conversion

Large whole numbers can lose precision when they are handled as standard JavaScript floating-point numbers. When the converter uses BigInt, integer conversion can avoid that rounding problem and preserve the exact whole-number value.

The Number Converter is intended for whole integers. Fractions, floating-point binary formats, and signed representations such as two's complement should only be considered supported if those options are explicitly available in the tool.

Common Binary Conversion Errors

Most conversion errors happen when a value contains digits that are not valid for the selected number system.

  • Binary: Only 0 and 1 are valid.
  • Octal: Only digits 0 through 7 are valid.
  • Decimal: Whole-number input uses digits 0 through 9.
  • Hexadecimal: Valid characters are 0-9 and A-F.

For text decoding, binary bytes normally need eight bits per byte. For example, 01000001 represents A, while 1000001 is missing the leading zero required for a complete 8-bit byte.

Privacy and Browser Processing

Binary and text conversions run locally in your browser memory. Data never leaves your device and requires no server upload.

Frequently Asked Questions

What can this Binary Converter convert?

It converts whole numbers between binary, decimal, octal, and hexadecimal. The Text ↔ Binary mode can also encode text as UTF-8 binary bytes and decode valid binary bytes back into text.

How do I convert binary to decimal?

Enter a value containing only 0 and 1 in the Binary field. The equivalent decimal value appears in the Decimal field.

How do I convert decimal to binary?

Enter a whole number in the Decimal field. The converter displays its equivalent base-2 value in the Binary field.

Can I convert binary to hexadecimal and octal?

Yes. Enter a valid binary number and the converter can show the equivalent hexadecimal and octal values along with the decimal value.

Can I convert text to binary?

Yes. Open the Text ↔ Binary mode and choose Text → Binary. The text is encoded as UTF-8 bytes, with each byte represented by an 8-bit binary group.

Why does text binary use 8-bit groups?

UTF-8 stores text as bytes, and each byte contains 8 bits. Basic ASCII characters usually use one byte, while many Unicode characters require two, three, or four bytes.

Does the Binary Converter support large integers?

The Number Converter can handle large whole-number values without the usual JavaScript Number rounding problem when its conversion logic uses BigInt. Practical limits still depend on the browser and available memory.

Does the converter support negative or fractional numbers?

The standard Number Converter is intended for whole integers. Fractions, floating-point formats, negative values, and signed binary formats such as two's complement should only be used if the interface explicitly provides support for them.