Text to Binary Converter

Convert text to binary, hex, octal, and decimal — or decode binary back to text. Supports custom separators, bit padding, and full ASCII table display.

Separator
Bit Padding

Binary Encoding Explained

Binary is the most fundamental number system in computing, using only two digits: 0 and 1. Every piece of data in a computer — text, images, audio, programs — is ultimately stored as sequences of binary digits (bits). When converting text to binary, each character is first mapped to a numeric code point, then that number is expressed in base 2.

For example, the word 'Hi' becomes '01001000 01101001' in 8-bit binary. The letter H has ASCII code 72 (01001000) and lowercase i has code 105 (01101001). Each character occupies one byte (8 bits) in standard ASCII encoding.

ASCII Character Encoding

ASCII (American Standard Code for Information Interchange) was created in 1963 and defines 128 characters using 7 bits. Codes 0-31 are control characters (like newline and tab), 32-126 are printable characters (letters, digits, punctuation), and 127 is the delete character.

ASCII's design has elegant patterns: uppercase letters start at 65 (A) and go to 90 (Z), while lowercase letters are at 97-122, exactly 32 higher. Digits 0-9 map to codes 48-57. This structure makes case conversion and digit parsing simple in code — just add or subtract fixed offsets.

Character Encoding Beyond ASCII

While ASCII covers English text, the world needs more characters. Extended ASCII (codes 128-255) added accented characters and symbols but was inconsistent across systems. Unicode solved this by assigning a unique code point to every character from every writing system — over 150,000 characters in the latest version.

UTF-8, the dominant encoding on the web, is backwards-compatible with ASCII for codes 0-127 (each using one byte) and uses 2-4 bytes for characters beyond ASCII. This means English text in UTF-8 is identical to ASCII, while characters like é (2 bytes), 中 (3 bytes), or emojis (4 bytes) use more space.

Binary in Computing and Programming

Understanding binary is essential for low-level programming, networking, and cybersecurity. Bitwise operations (AND, OR, XOR, NOT, shifts) work directly on binary representations and are used in permission flags, hash functions, compression algorithms, and encryption.

In networking, IP addresses are 32-bit binary numbers, subnet masks use binary patterns, and protocols encode headers as specific bit sequences. In web development, Base64 encoding converts binary data to text for embedding in HTML, email, and JSON. Binary literacy helps developers debug data corruption, understand encoding issues, and optimize performance-critical code.

Frequently Asked Questions

Related Tools

Explore More Tools

Find this tool useful? Buy us a coffee to keep DuskTools free and ad-light.