Skip to content

Text to Binary Converter

Type a word or sentence and get its binary code, one 8-bit group per byte. Switch the action to turn binary, hex, octal or decimal byte values back into text.

Runs in your browserFree, no sign-upLast reviewed

Settings

Results update automatically as you type.

Encoded

01001000 01100101 01101100 01101100 01101111

Details

Characters
5
Bytes
5
Base
Base 2

Quick answers

What is hello in binary?
Lowercase hello is 01101000 01100101 01101100 01101100 01101111. With a capital H, Hello is 01001000 01100101 01101100 01101100 01101111. Only the first group differs, because a capital letter and its lowercase form are 32 apart.
How do I convert text to binary?
Look up each character's ASCII number, then write that number in base 2 using eight digits. H is 72, and 72 is 64 + 8, so H is 01001000. Repeat for every character, including spaces (00100000), and separate the groups with spaces.
What is the letter A in binary?
Capital A is 01000001, which is 65 in decimal and 41 in hexadecimal. Lowercase a is 01100001, which is 97 in decimal and 61 in hexadecimal.
How do you write no in binary code?
Lowercase no is 01101110 01101111. Capitalized No is 01001110 01101111, and NO in capitals is 01001110 01001111. The word yes is 01111001 01100101 01110011.
What is dad in binary code?
Lowercase dad is 01100100 01100001 01100100. With a capital D, Dad is 01000100 01100001 01100100, and DAD in capitals is 01000100 01000001 01000100.
How many bits is one letter?
An English letter, digit or common punctuation mark is 8 bits, which is 1 byte. In UTF-8, accented Latin letters such as é take 16 bits, the euro sign takes 24 bits and most emoji take 32 bits.

What Text to Binary Converter does

Type any text and the converter writes out each byte as eight binary digits separated by spaces. Hello becomes 01001000 01100101 01101100 01101100 01101111. Plain English letters, digits and punctuation are one byte each, so one character gives one 8-bit group; text is encoded as UTF-8, so an accented letter gives two groups and an emoji gives four. The Number base menu shows the same bytes in octal, decimal or hexadecimal instead, and the Code → text action reverses the process: paste space-separated or comma-separated byte values and read the decoded words.

Binary alphabet chart: letters A to Z in binary, decimal and hex

Every value below is the converter's own output for that single letter.

UpperBinaryDecimalHexLowerBinaryDecimalHex
A010000016541a011000019761
B010000106642b011000109862
C010000116743c011000119963
D010001006844d0110010010064
E010001016945e0110010110165
F010001107046f0110011010266
G010001117147g0110011110367
H010010007248h0110100010468
I010010017349i0110100110569
J01001010744aj011010101066a
K01001011754bk011010111076b
L01001100764cl011011001086c
M01001101774dm011011011096d
N01001110784en011011101106e
O01001111794fo011011111116f
P010100008050p0111000011270
Q010100018151q0111000111371
R010100108252r0111001011472
S010100118353s0111001111573
T010101008454t0111010011674
U010101018555u0111010111775
V010101108656v0111011011876
W010101118757w0111011111977
X010110008858x0111100012078
Y010110018959y0111100112179
Z01011010905az011110101227a

Capital letters all start 010 and lowercase letters all start 011. The last five bits give the letter's position in the alphabet: A is 00001, B is 00010, Z is 11010.

Digits, space and punctuation in binary

A typed digit is stored as a character, not as the number itself, so the character 5 is 00110101 rather than 101.

CharacterBinaryDecimalHex
Space001000003220
Line break00001010100a
0001100004830
1001100014931
2001100105032
3001100115133
4001101005234
5001101015335
6001101105436
7001101115537
8001110005638
9001110015739
Period .00101110462e
Comma ,00101100442c
Exclamation mark !001000013321
Question mark ?00111111633f
Apostrophe '001001113927
Hyphen -00101101452d
At sign @010000006440
Hash #001000113523
Ampersand &001001103826

To convert a number's value between bases (for example 255 to 11111111), use the number base converter instead; this page converts characters.

Common words and phrases converted to binary

hi

hi

01101000 01101001

yes

yes

01111001 01100101 01110011

ok

ok

01101111 01101011

love

love

01101100 01101111 01110110 01100101

mom

mom

01101101 01101111 01101101

I love you

I love you

01001001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101

Ten bytes: eight letters plus two spaces, each space being 00100000.

Hello World

Hello World

01001000 01100101 01101100 01101100 01101111 00100000 01010111 01101111 01110010 01101100 01100100

The same word in other bases

Hello with Number base set to Octal, Decimal, then Hexadecimal

110 145 154 154 157 in octal, 72 101 108 108 111 in decimal, 48 65 6c 6c 6f in hexadecimal

How to convert a letter to binary by hand

character -> ASCII number -> sum of place values 128, 64, 32, 16, 8, 4, 2, 1

Start with the letter's ASCII number from the chart, for example H = 72. Work through the eight place values from left to right, writing 1 if the value fits into what is left and 0 if it does not. 128 does not fit (0). 64 fits, leaving 8 (1). 32 and 16 do not fit (0, 0). 8 fits, leaving 0 (1). 4, 2 and 1 do not fit (0, 0, 0). Reading the digits in order gives 01001000. Going the other way, add the place values that have a 1 under them: 01101001 is 64 + 32 + 8 + 1 = 105, which is the letter i.

Characters that need more than 8 bits

The converter uses UTF-8, the encoding used by almost all web pages and modern files. Compare the Characters and Bytes figures in the Details panel to spot these.

CharacterBytesBinary output
A101000001
é211000011 10101001
ñ211000011 10110001
€311100010 10000010 10101100
😀411110000 10011111 10011000 10000000

The first byte of a multi-byte character starts with 110, 1110 or 11110 to signal two, three or four bytes, and every following byte starts with 10. Decoding only part of such a sequence, for example 11000011 alone, gives a replacement character.

Binary to text: what the decoder accepts and rejects

  • Bytes must be separated by spaces, commas or line breaks. 01001000 01101001, or the same two groups on separate lines, decodes to Hi.
  • Leading zeros are optional: 1001000 1100101 1101100 1101100 1101111 decodes to Hello.
  • An unbroken run such as 0100100001100101 is rejected, because the tool does not split it into groups of eight for you. Insert a space after every eighth digit first.
  • Each value must be between 0 and 255 in the selected base. In decimal, 256 produces the message "256" is not a valid base-10 byte value.
  • The Number base must match the input. Binary groups read as decimal are rejected or produce the wrong letters.
  • A stray character inside a group is not always reported. Each value is read up to the first character that does not belong to the base, so 0110100x is read as 0110100 and 01001002 as 0100100, and the decoded letter is wrong. An error appears only when a group has no valid leading digit or is above 255.
  • Hexadecimal input can be upper or lower case and may carry a 0x prefix: 4A 4B decodes to JK. A joined string such as 48656c6c6f needs spaces between each pair.

Step by step

  1. 1

    Type or paste your text into the Input box. It opens with Hello as a sample.

  2. 2

    Leave Action on Text → code to turn text into numbers, or choose Code → text to decode.

  3. 3

    Pick a Number base: Binary (base 2), Octal (base 8), Decimal (base 10) or Hexadecimal (base 16).

  4. 4

    Read the Encoded panel and copy it. The Details panel shows Characters, Bytes and the Base.

  5. 5

    When decoding, separate every byte with a space, comma or line break and make sure Number base matches the values you pasted.

Answers to common questions

Is binary code the same as ASCII?
No. ASCII is a table that gives each of 128 characters a number from 0 to 127. Binary is a way of writing numbers using only 0 and 1. Text in binary is simply those ASCII numbers written in base 2. For the ASCII range, UTF-8 produces exactly the same bytes.
Why do capital and lowercase letters have different binary codes?
They are different characters with different numbers. Each lowercase letter is exactly 32 higher than its capital, which flips one bit: A is 01000001 and a is 01100001. That is why changing the case of a word changes its binary.
Can I convert a whole sentence or paragraph to binary?
Yes. Paste any amount of text and every byte is converted, including spaces, punctuation and line breaks. A space becomes 00100000 and a line break becomes 00001010, so the output can be decoded back to exactly the same text.
Can I get binary output without spaces or with a different separator?
Not directly. The output always puts one space between bytes, and there is no option for commas or no separator. Copy the result and remove the spaces in a text editor if you need a continuous string.
Why did my binary decode to the wrong text?
The usual causes are a missing or extra digit in one group, a mistyped character that cut a group short, the wrong Number base, or binary produced with a different encoding such as UTF-16. Check that every group has exactly eight digits, all of them 0 or 1, with a space between groups.
How do I convert a hex string to text?
Set Action to Code → text and Number base to Hexadecimal, then paste the bytes with a space between each pair. 48 65 6c 6c 6f decodes to Hello. The same works for octal (110 145 154 154 157) and decimal (72, 101, 108, 108, 111).
Does the converter support 7-bit ASCII or UTF-16 output?
No. Output is always UTF-8 bytes padded to eight binary digits, two hex digits or three octal digits; decimal values are not padded. For plain English text, seven-bit ASCII is the same as the output here with the leading 0 removed from each group.

Looking for something else? Browse all text tools or see every tool.