Skip to content
tools.best

Browse all tools

Text to Binary Converter

Type text to see it as 0s and 1s, eight bits for each byte. Switch direction to read binary back as text.

Runs in your browser. Your text is not sent to a server. Sources: RFC 20, RFC 3629 Updated

Direction
2 characters
17 characters

2 bytes, 16 bits

How text becomes binary

character β†’ UTF-8 bytes β†’ eight binary digits per byte

Binary is base 2. Each digit, or bit, is worth twice the one to its right: 128, 64, 32, 16, 8, 4, 2, 1. A byte is the sum of the place values where the bit is 1.

The character codes come from ASCII for basic Latin text and from UTF-8 for everything else. The ASCII to text converter shows the same codes as decimal numbers, and the full table of printable characters.

How to convert text to binary: a worked example

The text Hi:

  1. H has the code 72. 72 = 64 + 8, so the bits for 64 and 8 are set: 01001000
  2. i has the code 105. 105 = 64 + 32 + 8 + 1: 01101001
  3. Result: 01001000 01101001

Reading it back, 01001000 is 64 + 8 = 72, the letter H. To read binary, the tool needs whole bytes: the number of digits must divide by eight, and spaces between the groups are optional.

Binary is the longest way to write bytes. The same Hi is 48 69 in hexadecimal, two digits per byte, and SGk= in Base64, four characters for every three bytes.

The text "Hi" in binary as two rows of eight bits under the place values 128 to 1: H is 01001000, the bits for 64 and 8, which make 72; i is 01101001, the bits for 64, 32, 8 and 1, which make 105.
Add the place values above the filled squares to get the character code.

Binary alphabet: A to Z in 8-bit code

LetterBinaryLetterBinary
A01000001a01100001
B01000010b01100010
C01000011c01100011
D01000100d01100100
E01000101e01100101
F01000110f01100110
G01000111g01100111
H01001000h01101000
I01001001i01101001
J01001010j01101010
K01001011k01101011
L01001100l01101100
M01001101m01101101
N01001110n01101110
O01001111o01101111
P01010000p01110000
Q01010001q01110001
R01010010r01110010
S01010011s01110011
T01010100t01110100
U01010101u01110101
V01010110v01110110
W01010111w01110111
X01011000x01111000
Y01011001y01111001
Z01011010z01111010
space00100000000110000

A capital and its small letter differ in one bit only, the one worth 32: A is 01000001 and a is 01100001. The letters to numbers converter ignores that difference: a and A are both 1 there.

Text to Binary Converter: FAQ

How do you write a letter in binary?
Look up the letter's character code and write that number in base 2, padded to eight digits. Capital A is 65, which is 64 + 1, so it is 01000001.
Why are there eight digits per letter?
Eight bits make one byte, the unit computers store text in. A byte can hold 256 different values, enough for every basic Latin letter, digit and punctuation mark with one byte each.
How do I read binary back into text?
Switch to Binary to text and paste the digits. Spaces between the groups are optional, but the total number of digits must be a multiple of eight.
What happens with emoji or accented letters?
They are encoded as UTF-8, which uses two to four bytes for them. Γ© becomes two groups of eight bits and πŸ˜€ becomes four.
Is 01101000 01101001 the same in every program?
For basic Latin text, yes: ASCII and UTF-8 agree on those byte values, and this is hi everywhere. For other characters the bytes depend on the encoding. This tool always uses UTF-8, the encoding of the web.

Sources