Tools · Live
Binary Converter,
text to 0s & 1s and back.
Convert any text string into its binary representation (8-bit groups, UTF-8 encoded) or decode binary back to readable text. Instant, real-time, and fully client-side — nothing leaves your browser.
Characters
99
UTF-8 bytes
101
Total bits
808
Binary groups
101
Reference
Common ASCII characters in binary
| Char | Decimal | Hex | Binary |
|---|---|---|---|
| SP | 32 | 0x20 | 00100000 |
| A | 65 | 0x41 | 01000001 |
| Z | 90 | 0x5A | 01011010 |
| a | 97 | 0x61 | 01100001 |
| z | 122 | 0x7A | 01111010 |
| 0 | 48 | 0x30 | 00110000 |
| 9 | 57 | 0x39 | 00111001 |
| ! | 33 | 0x21 | 00100001 |
Field guide
Binary, bits, and bytes: how computers store text.
What is binary code?
Binary is the number system computers use internally. While humans count in base 10 (using digits 0–9), computers work in base 2, using only two possible states: 0 (off) and 1 (on). These states correspond to the absence or presence of an electrical charge in a transistor — the basic building block of every processor and memory chip.
A single binary digit is called a bit (binary digit). Eight bits grouped together form a byte. One byte can represent 2⁸ = 256 different values (0 through 255), which is enough to encode the 128 standard ASCII characters and many extended character sets.
How text is encoded in binary
Every character you type is assigned a numerical code. When you press "A", the keyboard sends the number 65 to the computer. The computer stores 65 as the binary number 01000001. When software displays this byte, it looks up character 65 in the character table and renders an "A" on screen.
This mapping is defined by a character encoding standard. The two most relevant here are:
- ASCII (American Standard Code for Information Interchange):The original standard, defining 128 characters — the 26 upper- and lowercase English letters, digits 0–9, punctuation, and control characters like newline and tab. ASCII characters always fit in 7 bits (values 0–127).
- UTF-8 (Unicode Transformation Format, 8-bit): The dominant encoding on the modern web, used by over 98% of web pages. UTF-8 is backward-compatible with ASCII — the first 128 UTF-8 characters are identical to ASCII — but extends to cover the full Unicode standard (over 140,000 characters), including accented letters, Arabic, Chinese, Japanese, emoji, and mathematical symbols. Non-ASCII characters in UTF-8 use 2, 3, or 4 bytes rather than just one.
This converter uses UTF-8 encoding (the browser's nativeTextEncoder / TextDecoder), which means it correctly handles characters outside the basic ASCII range, including emoji (🌍 encodes to 4 bytes: F0 9F 8C 8D in hex, or four 8-bit binary groups).
Reading binary: how to convert manually
Each 8-bit binary group represents one byte. To convert a binary number to decimal manually, multiply each bit by its positional value (powers of 2, right to left) and add the results:
01000001= 0×128 + 1×64 + 0×32 + 0×16 + 0×8 + 0×4 + 0×2 + 1×1 = 64 + 1 = 65 → character "A"01101000= 64 + 32 + 8 = 104 → character "h"00100001= 32 + 1 = 33 → character "!" (exclamation mark)
The positional values in an 8-bit byte (left to right) are: 128, 64, 32, 16, 8, 4, 2, 1. This is why the 8-bit system can represent 256 values — the sum of all these powers of 2 equals 255 (all bits set to 1), and zero (all bits 0) gives 0.
Why binary in computer science?
Binary is used because electronic circuits have two stable states: on and off, high voltage and low voltage, charged and uncharged. It is physically much easier to build a reliable component that distinguishes between two states than one that reliably holds 10 different voltage levels. This binary design also enables Boolean logic (AND, OR, NOT, XOR), which is the mathematical foundation of all computational operations.
Modern computers process 64 bits at a time in their CPU registers (hence "64-bit processor"), and memory is addressed in bytes. Every image, audio file, video, executable program, and database record is ultimately stored as a sequence of bytes — binary values from 0 to 255.
Practical uses of binary representation
- Debugging and network analysis: Network packets, file headers, and communication protocols are often documented in binary or hexadecimal. Reading binary allows you to inspect raw data at the byte level.
- Learning and education: Understanding how characters map to binary is foundational to computer science education, covering data representation, character encoding, and low-level storage concepts.
- Encoding schemes: Base64, hexadecimal, and octal are all higher-level representations of binary data. Understanding the underlying binary makes these formats easier to understand and debug.
- Fun and steganography: Binary-encoded messages have been used in puzzles, alternate reality games (ARGs), and creative coding challenges since the early days of the internet.
How this converter works
This tool runs entirely in your browser. No data is sent to a server. The conversion uses the browser's built-in TextEncoder(text → UTF-8 bytes → binary strings) and TextDecoder(binary strings → bytes → UTF-8 text) APIs. These are the same mechanisms used by modern web applications for all text encoding.
Input format for Binary → Text: binary groups separated by spaces (or commas). Each group must be exactly 8 bits (a byte). Leading zeros must be included: 00100000, not 100000.