Free forever · No sign-up
Text to Binary Converter
Convert any text to binary code instantly — every character becomes its UTF-8 binary. Free, fast, no sign-up.
Your data stays in your browser.
No recent conversions yet.
Step-by-step calculation
| Character | Code (decimal) | Binary |
|---|
How to convert text to binary
- Take each character and get its UTF-8 byte values (for A-Z these match the ASCII codes).
- Convert each byte to 8-bit binary.
- Join the bytes with spaces — that's your binary code.
Example: "Hi" → H = 72 = 01001000, i = 105 = 01101001 → 01001000 01101001.
Background reading: the ASCII standard and UTF-8 on Wikipedia.
Conversion table
Uppercase A–Z with code points and 8-bit binary. Lowercase a–z are 97–122 and digits 0–9 are 48–57.
| Char | Code point | Binary |
|---|---|---|
| A | 65 | 01000001 |
| B | 66 | 01000010 |
| C | 67 | 01000011 |
| D | 68 | 01000100 |
| E | 69 | 01000101 |
| F | 70 | 01000110 |
| G | 71 | 01000111 |
| H | 72 | 01001000 |
| I | 73 | 01001001 |
| J | 74 | 01001010 |
| K | 75 | 01001011 |
| L | 76 | 01001100 |
| M | 77 | 01001101 |
| N | 78 | 01001110 |
| O | 79 | 01001111 |
| P | 80 | 01010000 |
| Q | 81 | 01010001 |
| R | 82 | 01010010 |
| S | 83 | 01010011 |
| T | 84 | 01010100 |
| U | 85 | 01010101 |
| V | 86 | 01010110 |
| W | 87 | 01010111 |
| X | 88 | 01011000 |
| Y | 89 | 01011001 |
| Z | 90 | 01011010 |
Powers of 2
| Power | Value |
|---|---|
| 20 | 1 |
| 21 | 2 |
| 22 | 4 |
| 23 | 8 |
| 24 | 16 |
| 25 | 32 |
| 26 | 64 |
| 27 | 128 |
| 28 | 256 |
| 29 | 512 |
| 210 | 1024 |
| 211 | 2048 |
| 212 | 4096 |
| 213 | 8192 |
| 214 | 16384 |
| 215 | 32768 |
| 216 | 65536 |
Text to binary in code
Python
' '.join(format(b, '08b') for b in "Hi".encode())
# → '01001000 01101001'
JavaScript
const bytes = new TextEncoder().encode("Hi");
[...bytes].map(b => b.toString(2).padStart(8, "0")).join(" ");
// → '01001000 01101001'
C
#include <stdio.h>
int main(void) {
const char *s = "Hi";
for (int i = 0; s[i] != '\0'; i++) {
for (int bit = 7; bit >= 0; bit--)
putchar(((s[i] >> bit) & 1) ? '1' : '0');
putchar(' ');
}
putchar('\n'); /* → 01001000 01101001 */
return 0;
}
Real-world applications
- Seeing exactly how text is stored before it is encrypted or hashed.
- Preparing data for low-level protocols that expect raw bytes.
- Teaching character encoding in computer science classes.
- Debugging garbled text by comparing the expected and actual byte values.
Common mistakes
- Assuming every character is one byte — emoji and many scripts use two to four bytes in UTF-8.
- Confusing ASCII with UTF-8 — they match for A–Z but differ beyond code 127.
- Pasting rich text with invisible formatting characters that add surprise bytes.
Common values
- A =
01000001(65) - Z =
01011010(90) - a =
01100001(97) - space =
00100000(32) - 0 =
00110000(48) - ! =
00100001(33)
Key takeaways
- Each character is stored as its code point — ‘A’ is 65.
- Plain ASCII text uses 8 bits (one byte) per character.
- UTF-8 keeps ASCII identical and uses multiple bytes for other scripts and emoji.
- Group output in 8s to read one character per group.
Frequently asked questions
How do I convert text to binary?
Convert each character to its UTF-8 bytes, then each byte to 8-bit binary. The converter above does it instantly.
What is “hello” in binary?
“Hello” in binary is 01001000 01100101 01101100 01101100 01101111.
Does it support emoji and non-English text?
Yes — it uses UTF-8, so emoji and non-Latin scripts convert correctly.
How many bits is one character?
In UTF-8, A–Z take 8 bits each, but emoji and many non-Latin characters take 16–32 bits.
What is the binary for a space?
A space is byte 32, which is 00100000 in binary.
What is ‘A’ in binary?
‘A’ is code point 65 = 01000001 in 8-bit binary.
Does this handle emoji?
Yes — the encoder uses UTF-8, so emoji become multi-byte sequences (for example 😀 is 4 bytes = 32 bits).
Why is each character 8 bits?
Plain ASCII/UTF-8 text stores one character per byte (8 bits), which is why the output is grouped in 8s.
Need the reverse? Try our binary to text converter.
More converters
Add this converter to your website
Embed our free binary to decimal converter on your own site with one line of code:
<script src="https://binary-to-decimal-28z.pages.dev/embed.js"></script>