Free tool

Text to binary translator

Type text to see it as binary, or paste binary to read it as text. Each character becomes its UTF-8 bytes, 8 bits each, so "Hi" is 01001000 01101001 and emoji work too.

Free · no sign-up · runs in your browser, nothing is uploaded

Text input
encoding · UTF-8
Binary
01001000 01100101 01101100 01101100 01101111 00101100 00100000 01000100 01100101 01110110 01001000 01110101 01101110 01110100 00100001 00100000 01100011 01100001 01100110 11000011 10101001 00100000 11110000 10011111 10010001 10001011

Characters

22

Bytes (UTF-8)

26

Bits

208

Character by character
charcode pointUTF-8 bytes (binary)
HU+004801001000
eU+006501100101
lU+006C01101100
lU+006C01101100
oU+006F01101111
,U+002C00101100
spaceU+002000100000
DU+004401000100
eU+006501100101
vU+007601110110
HU+004801001000
uU+007501110101
nU+006E01101110
tU+007401110100
!U+002100100001
spaceU+002000100000
cU+006301100011
aU+006101100001
fU+006601100110
éU+00E911000011 10101001
spaceU+002000100000
👋U+1F44B11110000 10011111 10010001 10001011
Drop a text file here, or click to pick one. It is read in your browser.

How text becomes binary

Computers store numbers, not letters. A character encoding gives each character a number and says how to write it as bytes. ASCII, from the 1960s, covers 128 characters (English letters, digits, punctuation and control codes) in 7 bits, stored one per byte. A is 65, which is 01000001.

UTF-8 is the encoding the web and almost all modern software use. It keeps every ASCII character as the same single byte and uses 2 to 4 bytes for the rest of Unicode. The leading bits of the first byte say how many bytes the character has:

Code pointsBytesBit pattern
U+0000 to U+007F10xxxxxxx
U+0080 to U+07FF2110xxxxx 10xxxxxx
U+0800 to U+FFFF31110xxxx 10xxxxxx 10xxxxxx
U+10000 to U+10FFFF411110xxx 10xxxxxx 10xxxxxx 10xxxxxx

Example: why 👋 is 32 bits

The waving hand emoji is code point U+1F44B. That is above U+FFFF, so UTF-8 uses four bytes. The code point’s 21 bits are spread over the x slots of the pattern:

U+1F44B         = 0 0001 1111 0100 0100 1011 (21 bits)
split 3/6/6/6     000  011111  010001  001011
into the pattern  11110000 10011111 10010001 10001011
hex               F0       9F       91       8B

The character-by-character table under the translator shows this split for every character you type. An é is two bytes (C3 A9); the Chinese character 中 is three (E4 B8 AD).

Reading binary back as text

  • Group into bytes. Each byte is 8 bits. Spaces between bytes make it unambiguous; without them the translator cuts the bits into groups of 8 and tells you if the length is not a multiple of 8.
  • 7-bit groups. Some older examples drop the leading 0 of ASCII bytes (1001000 for H). With spaces between them they still decode here.
  • Invalid bytes. Not every byte sequence is valid UTF-8; a lone 11111111 never is. The translator shows � for it and names the byte, which usually means a missing bit or text in another encoding.
  • Hex dumps. Switch the byte format to Hex to decode 48 69, 4869 or \x48\x69.

Text to binary in code

// JavaScript (browser or Node): text → binary
[...new TextEncoder().encode('Hi')]
  .map(b => b.toString(2).padStart(8, '0'))
  .join(' ');                                   // '01001000 01101001'

// binary → text
new TextDecoder().decode(
  Uint8Array.from('01001000 01101001'.split(' '), b => parseInt(b, 2)));  // 'Hi'

# Python
' '.join(f'{b:08b}' for b in 'Hi'.encode())     # '01001000 01101001'
bytes(int(b, 2) for b in s.split()).decode()     # back to text

# Terminal
echo -n Hi | xxd -b      # 00000000: 01001000 01101001  Hi

charCodeAt() alone is not enough for this: it returns UTF-16 code units, so an emoji comes back as two numbers above 255 instead of its four UTF-8 bytes. Use TextEncoder to get real bytes.

Letters and digits in binary

The ASCII codes of common characters, which are also their UTF-8 bytes. For the full 0-127 table with control codes, see the ASCII table; to inspect any Unicode character, the Unicode converter. To turn numbers (not text) into binary, use the binary converter.

chardecbinary
A6501000001
B6601000010
C6701000011
D6801000100
E6901000101
F7001000110
G7101000111
H7201001000
I7301001001
J7401001010
K7501001011
L7601001100
M7701001101
N7801001110
O7901001111
P8001010000
Q8101010001
R8201010010
chardecbinary
S8301010011
T8401010100
U8501010101
V8601010110
W8701010111
X8801011000
Y8901011001
Z9001011010
a9701100001
b9801100010
c9901100011
d10001100100
e10101100101
f10201100110
g10301100111
h10401101000
i10501101001
j10601101010
chardecbinary
k10701101011
l10801101100
m10901101101
n11001101110
o11101101111
p11201110000
q11301110001
r11401110010
s11501110011
t11601110100
u11701110101
v11801110110
w11901110111
x12001111000
y12101111001
z12201111010
04800110000
14900110001
chardecbinary
25000110010
35100110011
45200110100
55300110101
65400110110
75500110111
85600111000
95700111001
space3200100000
!3300100001
.4600101110
,4400101100
?6300111111
@6401000000

FAQ

How do you convert text to binary?+

Each character is turned into bytes with a character encoding (UTF-8 on the web), and each byte is written as 8 bits. "H" is byte 72, which is 01001000. Type in the box above and the translator does this for every character as you type.

How do you say "I love you" in binary?+

01001001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101. That is ten bytes: I, space, l, o, v, e, space, y, o, u, each as its 8-bit ASCII code.

What is "hello" in binary?+

01101000 01100101 01101100 01101100 01101111. Lowercase letters start at 01100001 (a = 97); uppercase letters at 01000001 (A = 65), so the two cases differ only in one bit (value 32).

How many bits is one character?+

In ASCII and for plain English text in UTF-8, 8 bits (one byte). Accented letters like é take 16 bits in UTF-8, most Asian scripts take 24, and emoji take 32. The stats under the translator count characters, bytes and bits.

How do I translate binary back to text?+

Paste the binary in the box; the translator notices it is only 0s and 1s and decodes it. Bytes can be separated by spaces, commas or new lines, carry 0b prefixes, or have no separators at all if every byte has 8 bits. Invalid UTF-8 is pointed out by byte number.

What is the difference between ASCII and UTF-8 binary?+

For the 128 ASCII characters (English letters, digits, basic punctuation) there is none: UTF-8 uses the same single byte. UTF-8 then adds 2, 3 and 4-byte sequences for every other Unicode character, which ASCII cannot represent at all.

Is binary code still used?+

Everything a computer stores or sends is binary. People rarely write it by hand, though: hex is the usual way to show bytes because it is shorter, and this translator can output hex, decimal or octal bytes as well.

Sources: RFC 3629 (UTF-8) · RFC 20 (ASCII) · Unicode Standard, ch. 3 (encoding forms) · MDN: TextEncoder · MDN: TextDecoder · Python: str.encode() · xxd(1) man page. Checked 2026-10-30.