Text to Binary Converter
Convert text to binary code and vice versa
Binary
Enter input above
Common Characters
A
01000001
B
01000010
a
01100001
b
01100010
0
00110000
1
00110001
SP
00100000
!
00100001
@
01000000
#
00100011
.
00101110
?
00111111
What is Text to Binary Conversion?
Text to binary conversion is the process of translating human-readable text characters into binary code — the language of zeros and ones that computers use to store and process data. Every character you type on a keyboard, from letters and numbers to punctuation marks and spaces, is represented in a computer as a specific pattern of 8 bits (binary digits), commonly called a byte.
The most widely used encoding standard for this conversion is ASCII (American Standard Code for Information Interchange), which assigns a unique 7-bit binary number to each character. For example, the capital letter "A" is represented as 01000001 (decimal 65), while the lowercase "a" is 01100001 (decimal 97). The extended ASCII and Unicode standards expand this system to include characters from virtually every writing system in the world.
Binary code is the fundamental language of digital computers. Every file on your computer, every email you send, and every image on a website is ultimately stored as sequences of zeros and ones. Understanding text-to-binary conversion provides insight into how computers actually represent and process the information we interact with daily. It is also essential knowledge for programmers working with bitwise operations, data encoding, cryptography, and low-level systems programming.
This converter handles both directions: text to binary and binary to text. Enter text to see its binary representation, or enter space-separated binary bytes to decode them back into readable characters.
Text to Binary Conversion Process
The conversion from text to binary follows a systematic process. First, each character is looked up in the ASCII table to find its decimal code number. Then, that decimal number is converted to an 8-bit binary representation by repeatedly dividing by 2 and recording the remainders.
For example, the letter "H" has ASCII code 72. Dividing 72 by 2 repeatedly: 72÷2=36 remainder 0, 36÷2=18 remainder 0, 18÷2=9 remainder 0, 9÷2=4 remainder 1, 4÷2=2 remainder 0, 2÷2=1 remainder 0, 1÷2=0 remainder 1. Reading the remainders from bottom to top gives 1001000, padded to 8 bits as 01001000.
ASCII Binary Encoding
Where:
- character= Any text character (letter, number, symbol, space)
- charCodeAt= Function that returns the Unicode code point (ASCII value) of a character
- decimal_to_binary= Converts the decimal code point to an 8-bit binary string
- binary= 8-bit binary representation (e.g., '01000001' for 'A')
Common ASCII Binary Values
The ASCII table defines binary codes for 128 characters. Some commonly referenced values include: A = 01000001 (65), B = 01000010 (66), a = 01100001 (97), b = 01100010 (98), 0 = 00110000 (48), 1 = 00110001 (49), and space = 00100000 (32).
The ASCII table is organized into ranges: uppercase letters occupy decimal 65-90, lowercase letters occupy 97-122, digits occupy 48-57, and common punctuation marks occupy positions 32-47 and 58-64. Understanding these ranges helps programmers quickly estimate binary values and spot encoding errors.
Modern systems use Unicode (particularly UTF-8 encoding), which extends ASCII to include over 143,000 characters covering virtually every writing system, emoji, and special symbol. UTF-8 is backward-compatible with ASCII, meaning ASCII characters use the same 1-byte binary codes, while non-ASCII characters use 2 to 4 bytes.
How to Use This Calculator
This converter works in two modes:
- Text to Binary Mode: Type any text into the input textarea. The converter immediately displays the binary representation, with each character encoded as an 8-bit byte separated by spaces. The "Common Characters" reference table shows binary codes for frequently used characters.
- Binary to Text Mode: Switch to "Binary to Text" mode and enter space-separated binary bytes (e.g., "01001000 01100101 01101100 01101100 01101111"). The converter decodes the binary back into readable text.
- Switch Modes: Use the toggle buttons at the top to switch between encoding and decoding modes. Each mode clears the input for fresh entry.
Real-World Applications
Text-to-binary conversion is fundamental in computer science education. Understanding how characters are represented in binary helps students grasp the relationship between human-readable data and the machine-level representation that computers actually process. This knowledge is prerequisite for understanding character encoding, data storage, and network communication.
In programming and systems development, working with binary representations of text is essential for implementing custom encodings, debugging character encoding issues, developing cryptographic algorithms that operate on bit-level data, and optimizing data storage through compression techniques.
Cybersecurity professionals use binary text conversion when analyzing malware, reverse-engineering binary files, and developing encryption and decryption tools. Understanding how text is encoded in binary helps identify obfuscation techniques and data exfiltration methods.
In data communication, binary encoding is the foundation of network protocols. Every HTTP request, email, and file transfer ultimately involves converting text data into binary for transmission over physical media (copper, fiber optic, or wireless) and then decoding it back into text at the destination.
Worked Examples
Converting 'Hello' to Binary
Problem:
Convert the word 'Hello' to its binary representation.
Solution Steps:
- 1H = ASCII 72 = 01001000
- 2e = ASCII 101 = 01100101
- 3l = ASCII 108 = 01101100
- 4l = ASCII 108 = 01101100
- 5o = ASCII 111 = 01101111
Result:
Hello = 01001000 01100101 01101100 01101100 01101111
Converting 'Hi!' to Binary
Problem:
Convert the text 'Hi!' to binary and count the total bits.
Solution Steps:
- 1H = ASCII 72 = 01001000 (8 bits)
- 2i = ASCII 105 = 01101001 (8 bits)
- 3! = ASCII 33 = 00100001 (8 bits)
- 4Total: 3 characters × 8 bits = 24 bits
Result:
Hi! = 01001000 01101001 00100001 (24 bits total)
Decoding Binary to Text
Problem:
Decode the binary sequence 01000011 01101111 01100100 01100101 back to text.
Solution Steps:
- 101000011 = decimal 67 = 'C'
- 201101111 = decimal 111 = 'o'
- 301100100 = decimal 100 = 'd'
- 401100101 = decimal 101 = 'e'
Result:
The binary decodes to the word 'Code'.
Tips & Best Practices
- ✓Use this converter to quickly verify ASCII codes when debugging character encoding issues.
- ✓Remember that uppercase and lowercase letters have different binary codes — they differ by exactly one bit.
- ✓Spaces between binary bytes are important for correct decoding — don't omit them.
- ✓The converter uses standard ASCII encoding; for extended character sets, additional bytes may be needed.
- ✓Common ASCII codes to memorize: A=65 (01000001), a=97 (01100001), 0=48 (00110000), space=32 (00100000).
- ✓Binary is a base-2 number system — each digit position represents a power of 2, just as decimal digits represent powers of 10.
Frequently Asked Questions
Sources & References
Last updated: 2026-06-06
Help us improve!
How would you rate the Text to Binary Converter?
Editorial Note
MyCalcBuddy Editorial Team
This page is maintained as an educational calculator reference.
Formula Source: NIST Guide to SI Units
by National Institute of Standards