Text to binary converter

Paste text and get binary code, one 8-bit byte per character (more for emoji and accents). Choose spacing to match what you need.

5 chars · 5 bytes
40 bits

How to convert text to binary by hand

  1. Find the character's decimal code in the ASCII table. “h” is 104.
  2. Subtract the largest power of two that fits (64), then the next (32), then 8. 104 = 64 + 32 + 8.
  3. Write a 1 under each power you used and a 0 under the rest: 128 64 32 16 8 4 2 1 → 0 1 1 0 1 0 0 0.
  4. Repeat for each character and put a space between bytes.

The decimal to binary converter shows this subtraction (or the repeated-division method) for any number you enter.

Text to binary chart: every printable character

CharBinaryDec
space0010000032
!0010000133
"0010001034
#0010001135
$0010010036
%0010010137
&0010011038
'0010011139
(0010100040
)0010100141
*0010101042
+0010101143
,0010110044
-0010110145
.0010111046
/0010111147
00011000048
10011000149
20011001050
30011001151
40011010052
50011010153
60011011054
70011011155
80011100056
90011100157
:0011101058
;0011101159
<0011110060
=0011110161
>0011111062
?0011111163
CharBinaryDec
@0100000064
A0100000165
B0100001066
C0100001167
D0100010068
E0100010169
F0100011070
G0100011171
H0100100072
I0100100173
J0100101074
K0100101175
L0100110076
M0100110177
N0100111078
O0100111179
P0101000080
Q0101000181
R0101001082
S0101001183
T0101010084
U0101010185
V0101011086
W0101011187
X0101100088
Y0101100189
Z0101101090
[0101101191
\0101110092
]0101110193
^0101111094
_0101111195
CharBinaryDec
`0110000096
a0110000197
b0110001098
c0110001199
d01100100100
e01100101101
f01100110102
g01100111103
h01101000104
i01101001105
j01101010106
k01101011107
l01101100108
m01101101109
n01101110110
o01101111111
p01110000112
q01110001113
r01110010114
s01110011115
t01110100116
u01110101117
v01110110118
w01110111119
x01111000120
y01111001121
z01111010122
{01111011123
|01111100124
}01111101125
~01111110126

Questions people ask

How do you convert text to binary?

Look up each character’s code (A = 65), then write that number in base 2 using 8 digits: 65 = 64 + 1 = 01000001. For characters beyond ASCII, first encode them as UTF-8 bytes, then write each byte in binary.

What is “hello” in binary?

01101000 01100101 01101100 01101100 01101111.

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

For the 128 ASCII characters there is no difference. For anything else ASCII has no code at all, while UTF-8 uses 2–4 bytes. Choose UTF-8 unless an assignment asks for 7-bit ASCII.

Why does every letter start with 0?

ASCII codes stop at 127, which fits in 7 bits. The eighth, leftmost bit of the byte is therefore always 0 for plain English text.

Can I convert the alphabet or a whole file to binary?

Yes. Type letters or open a .txt file with “Open file”, then download the binary. The letter-by-letter chart is on the binary alphabet page.

Can I get binary without spaces?

Yes. Choose “No spaces” in the separator menu. Commas are also available for pasting into code.