Stax
Tools

Binary Text Converter

Convert text to binary, hex, or octal — and decode back.

Number bases in computing

Computers store everything as binary (base 2). Humans use decimal (base 10) for everyday numbers. Hexadecimal (base 16) and octal (base 8) are used as convenient shorthand for binary — they group bits into 4-bit and 3-bit chunks respectively, making large binary numbers far easier to read.

Quick conversion table

  • Binary 01001000 = Decimal 72 = Hex 48 = Octal 110 = 'H'
  • Binary 01100101 = Decimal 101 = Hex 65 = Octal 145 = 'e'
  • Binary 01001100 = Decimal 76 = Hex 4C = Octal 114 = 'L'

How to use this converter

  • Text → Binary: Enter any text, get space-separated 8-bit bytes
  • Binary → Text: Paste space-separated binary bytes (e.g., 01001000 01101001)
  • Text → Hex: Each character becomes a 2-digit uppercase hex code
  • Hex → Text: Paste space-separated hex bytes (e.g., 48 65 6C 6C 6F)

Common use cases for binary and hex conversion

Computer science students use text-to-binary conversion to understand how characters are stored in memory and to complete assignments on character encoding. Security researchers analyse binary and hex representations of file headers and network packets. Developers working with low-level protocols (BLE, CAN bus, Modbus) need to convert between human-readable text and hex byte strings. Educators use it to explain the ASCII table and character encoding in programming fundamentals courses.

ASCII vs Unicode — what this converter handles

The ASCII standard assigns 7-bit codes (0–127) to 128 characters — English letters, digits, and control characters. Extended ASCII (128–255) covers accented characters using 8 bits. Unicode extends this massively — over 140,000 characters — using 1 to 4 bytes per character in UTF-8 encoding. This converter operates on the raw character code points, which works correctly for ASCII and extended ASCII. For multi-byte Unicode characters (emoji, Devanagari, CJK), the binary output reflects the JavaScript code point, not the full UTF-8 byte sequence.

Why hexadecimal is preferred over binary in practice

Binary is the native language of computers but is verbose — a single byte requires 8 characters. Hexadecimal represents the same byte in just 2 characters, making memory dumps, packet captures, and cryptographic hashes far easier to read and compare. A SHA-256 hash is 64 hex characters; in binary it would be 256 characters. Octal was historically used in Unix permissions (chmod 755) where three octal digits neatly represent three groups of three permission bits.

Frequently asked questions

How is text converted to binary?
Each character in the text is converted to its ASCII (or Unicode) code point. That number is then written in base 2 (binary), padded to 8 bits. For example, 'H' is ASCII 72, which is 01001000 in binary. Each byte (8-bit group) represents one character.
How do I read binary code?
Binary uses only digits 0 and 1. Each group of 8 bits (a byte) represents one character. To decode: split binary into groups of 8 bits, convert each group from base 2 to decimal, then look up the decimal value in the ASCII table. For example, 01001000 = 72 = 'H'.
What is hexadecimal (hex) and how is it used in computing?
Hexadecimal (base 16) uses digits 0–9 and A–F. Each hex digit represents 4 bits, so 2 hex digits represent 1 byte. Hex is widely used in computing for colour codes (#FF5733), memory addresses (0x7fff), character encodings (U+0041 = 'A'), and cryptographic hashes. It is more compact and readable than raw binary.
What is octal and where is it used?
Octal (base 8) uses digits 0–7. Each octal digit represents 3 bits. Octal is historically used in Unix file permissions (chmod 755), older programming languages (C/C++ octal literals with leading 0), and embedded systems. It is less common than hex in modern programming.
Does this converter support Unicode / emoji?
This converter works with ASCII characters (0–127) and extended ASCII (128–255). For Unicode characters beyond the Basic Latin block (emoji, Devanagari, Chinese, etc.), the conversion uses the character's code point, which may be larger than a single byte.

Related tools