Binary translator: text to binary and binary to text

Written and maintained by Mubashir Alam, software engineer and web developer who builds MorsePad. Last updated November 2026.

This binary translator turns text into binary and binary back into text while you type. Write in the Text box to get 0s and 1s, or paste binary into the Binary box to read it as English or any other language. Each character is converted to its UTF-8 bytes, and the hexadecimal and decimal values are shown too, so you can check the result against a table or your own working.

Type in either box and the other one updates as you type.

Hexadecimal

48 69

Decimal

72 105

Hi encoded as UTF-8 bytes 01001000 and 01101001, with decimal values 72 and 105
Hi uses two UTF-8 bytes: H is 01001000 and i is 01101001.

MorsePad is a Morse code site, so further down you will also find how binary compares with Morse. Both are two-state codes, and Morse can be written out as ones and zeros too, with one big difference in how the two mark where a letter ends.

How to use the binary translator

Type or paste into either box. The other box updates as you go, so there is no convert button.

  1. To convert text to binary, type in the Text box. "Hi" becomes 01001000 01101001.
  2. To convert binary to text, paste the 0s and 1s into the Binary box. You can separate the bytes with spaces or paste one long unbroken string, which the tool splits every 8 bits (or every 7 in 7-bit mode).
  3. Pick an encoding. 8-bit (UTF-8) handles every character, including accented letters, other alphabets and emoji. 7-bit (ASCII) writes each character with seven digits and only covers basic English letters, digits and punctuation.
  4. Use the Space between bytes option to split the output into readable groups, or turn it off when you need one continuous string.
  5. Copy binary copies the result, Share link lets you pass the text conversion on, and Clear empties both boxes.

Share links restore the text in default 8-bit mode with spaces between bytes; they do not save the encoding or spacing options.

The Hexadecimal and Decimal readouts show the same bytes in base 16 and base 10. For "Hi" they read 48 69 and 72 105. Programmers usually work in hex, so it is the quickest way to compare your output with code or a byte dump.

How text becomes binary

Computers store every character as a number. In ASCII and UTF-8, capital A is 65, lowercase a is 97 and a space is 32. A binary translator writes those numbers in base 2, which uses only the digits 0 and 1.

Each 0 or 1 is a bit, and eight bits make a byte. A byte can hold any whole number from 0 to 255. Reading from left to right, the eight positions in a byte are worth 128, 64, 32, 16, 8, 4, 2 and 1. To get the number, add up the positions that hold a 1.

Place value1286432168421Total
A0100000165
H0100100072
i01101001105

For A, only the 64 and the 1 are switched on, and 64 + 1 = 65. To go the other way, take the character's number, find the largest place value that fits, put a 1 there and carry on with what is left. H is 72: 64 fits and leaves 8, and 8 fits exactly, so H is 01001000.

ASCII and UTF-8

Most binary examples you see online are based on ASCII. It was first published in 1963 and had a major revision in 1967. It defines 128 codes, numbered 0 to 127: 95 printable characters (English letters, digits, punctuation and the space) and 33 control codes such as tab and line feed. 128 values fit in 7 bits, so ASCII is a 7-bit code. Computers store it in 8-bit bytes with the extra leading bit set to 0, which is why every ASCII character in 8-bit binary starts with 0.

UTF-8 is the encoding used on almost every website today; W3Techs reports about 99% of sites whose character encoding it can identify. Its first 128 codes are identical to ASCII, so plain English text produces exactly the same bytes in both. Any character outside ASCII takes two, three or four bytes.

Code pointsBytesCoversExampleUTF-8 binary
0 to 1271ASCIIA01000001
128 to 2,0472Accented Latin, Greek, Cyrillic, Hebrew, Arabicé11000011 10101001
2,048 to 65,535 (excluding surrogates)3Most Chinese, Japanese and Korean characters, symbols like €€11100010 10000010 10101100
65,536 to 1,114,1114Most emoji, historic scripts😀11110000 10011111 10011000 10000000

The first bits of each byte tell a decoder how to read it. A byte starting with 0 is a complete ASCII character. A byte starting with 110, 1110 or 11110 begins a character that is two, three or four bytes long, and a byte starting with 10 continues the character before it. That is how a UTF-8 decoder can tell an accented letter apart from plain ASCII without any separators.

Emoji sizes vary a lot. 😀 takes four bytes, but the plain heart ❤ takes three. The red heart ❤️ that phones usually send is the heart plus an invisible variation selector, so it takes six. A thumbs up with a skin tone, 👍🏽, is a thumbs up followed by a skin tone modifier and takes eight.

Binary alphabet: letters and digits in binary

ASCII letters follow a pattern you can learn in a minute. Every capital letter starts with 010, and the last five bits give its position in the alphabet: A is 01000001 (position 1), B is 01000010 (2) and Z is 01011010 (26). Lowercase letters start with 011 instead, so a capital and its lowercase partner differ by one bit, the one worth 32. Digits start with 0011, and the last four bits are the digit itself, so 5 is 00110101.

LetterCodeBinaryLetterCodeBinary
A6501000001a9701100001
B6601000010b9801100010
C6701000011c9901100011
D6801000100d10001100100
E6901000101e10101100101
F7001000110f10201100110
G7101000111g10301100111
H7201001000h10401101000
I7301001001i10501101001
J7401001010j10601101010
K7501001011k10701101011
L7601001100l10801101100
M7701001101m10901101101
N7801001110n11001101110
O7901001111o11101101111
P8001010000p11201110000
Q8101010001q11301110001
R8201010010r11401110010
S8301010011s11501110011
T8401010100t11601110100
U8501010101u11701110101
V8601010110v11801110110
W8701010111w11901110111
X8801011000x12001111000
Y8901011001y12101111001
Z9001011010z12201111010

Digits and common punctuation

CharacterCodeBinary
04800110000
14900110001
25000110010
35100110011
45200110100
55300110101
65400110110
75500110111
85600111000
95700111001
Space3200100000
!3300100001
,4400101100
.4600101110
?6300111111

If you want the same letters as dots and dashes, the Morse code alphabet and Morse code numbers charts have them with audio.

Worked examples

Text to binary: "Hi"

H is 72, which is 64 + 8, so it becomes 01001000. Lowercase i is 105, which is 64 + 32 + 8 + 1, so it becomes 01101001. "Hi" in binary is 01001000 01101001, or 48 69 in hex.

Binary to text: 01001111 01001011

In the first byte the 64, 8, 4, 2 and 1 positions are on. They add up to 79, the letter O. The second byte has 64, 8, 2 and 1 on, which makes 75, the letter K. The message reads OK.

A character outside ASCII: é

é has the code point 233, which is too big for 7 bits, so ASCII cannot store it. UTF-8 writes it as two bytes, 11000011 10101001 (C3 A9 in hex). The 110 at the start of the first byte says a two-byte character begins here, and the 10 at the start of the second says this byte continues it. Strip those markers off and the bits that remain, 00011 and 101001, join up to 11101001, which is 233.

Common words in binary

TextBinary (8-bit, one byte per character)
Hello01001000 01100101 01101100 01101100 01101111
hello01101000 01100101 01101100 01101100 01101111
OK01001111 01001011
SOS01010011 01001111 01010011
I love you01001001 00100000 01101100 01101111 01110110 01100101 00100000 01111001 01101111 01110101

"Hello" and "hello" differ only in the first byte, because H and h are one bit apart. The spaces in "I love you" are characters too, each one 00100000. You can see the same words as dots and dashes on the Hello, SOS and I love you Morse pages.

Why binary decodes to strange symbols

Nearly every bad result comes from bits in the wrong groups. In 8-bit mode each byte needs exactly 8 digits. If one digit goes missing or gets doubled, every byte after it shifts and turns into nonsense. Paste with spaces between the bytes and a short or long group is easy to spot.

Check the mode as well. Binary written in 7-digit groups (1001000 1101001 for "Hi") reads wrongly in 8-bit mode, and the other way round. If the binary came from a program that saved text in a different encoding, such as UTF-16, its bytes will not line up with UTF-8 and the text will look scrambled. Before pasting, remove anything that is not a 0, a 1 or a space, such as commas or the 0b prefix that some programming languages put in front of binary numbers.

Morse code vs binary

Morse code and binary are both built from two states. A telegraph key or radio transmitter sends Morse by switching a signal on and off, so at the lowest level it is a stream of on and off, just like a stream of bits. Where the two codes differ is in how they mark the end of one character and the start of the next.

ASCII defines fixed 7-bit codes. In this tool’s 8-bit output, a decoder counts off eight bits, reads a letter and moves on. Morse letters have different lengths: E is a single dot and T a single dash, while Q takes four elements (--.-). Alfred Vail, who worked with Samuel Morse on the code, gave the shortest patterns to the letters that appear most often in English, which keeps typical messages short.

Morse code written as ones and zeros

If you write a Morse signal out in time units, with 1 for each unit of sound and 0 for each unit of silence, it becomes a string of bits. Standard Morse timing gives the rules:

Morse elementLengthAs bits
Dot1 unit on1
Dash3 units on111
Gap inside a letter1 unit off0
Gap between letters3 units off000
Gap between words7 units off0000000

So E is 1, T is 111 and A (.-) is 10111. SOS is sent as one unbroken signal, ...---..., with no letter gaps, which makes it 10101011101110111010101: 23 units. Sent as three separate letters with gaps it would take 27. In 8-bit ASCII the same three letters take 24 bits (01010011 01001111 01010011), and those bits only make sense because the receiver already knows to read them in groups of eight. The Morse string marks its own letter boundaries with silence.

To see the dots and dashes for any text, type it into the Morse code translator. To hear the timing, use the Morse audio generator, or watch it flash with Morse code light.

Why Morse needs gaps and binary text does not

Take the Morse sequence ..-. with no gaps in it. It could be F, but it could also be IN, ER, UE, ITE, EAE, EEN or EETE: eight valid readings using only the letters A to Z. The pauses tell the listener which one was meant, so a Morse decoder has to time the silences as carefully as the tones.

Computer codes get around this in two ways. ASCII makes every character the same length, so no separator is needed. UTF-8 marks the length with leading byte patterns and identifies continuation bytes. Many compression formats use prefix codes, where no symbol’s code is the beginning of another one, so a decoder knows where each symbol ends. Morse fails that test, since E (.) is the start of A (.-). Huffman coding, published in 1952, builds prefix codes that give common symbols the shortest codes, the same idea Vail used when he gave E a single dot. Prefix codes of this kind are still used inside ZIP files and JPEG images.

From telegraph codes to ASCII

The codes computers use for text grew out of telegraph codes. The famous Washington–Baltimore Morse telegraph demonstration took place in 1844, and its uneven letter lengths suited human operators better than machines. In 1874 Émile Baudot patented a 5-bit code in which every character had the same length. Donald Murray adapted it for punched paper tape in 1901, and a version of it became the international telegraph standard, ITA2, in the 1930s. ASCII was a 7-bit teleprinter code built partly on those earlier codes, and UTF-8, designed in 1992, extended it to cover all of Unicode while keeping ASCII's 128 codes unchanged.

ComparisonMorse codeBinary text (ASCII / UTF-8)
Basic statesSignal on or off1 or 0
Length of a character1 to 4 elements for letters, 5 for digits7-bit ASCII codes; stored here as 8-bit bytes, 1–4 bytes per UTF-8 code point
How characters are separatedSilences: 3 units between letters, 7 between wordsFixed 8-bit groups, plus lead bits in UTF-8
Shorter codes for common lettersYes, E is one dotNo, every ASCII letter uses one byte in this tool
Who reads itPeople, by ear or by eyeMostly machines
First used1844ASCII 1963, UTF-8 1992

More MorsePad tools

Binary as a number system

Binary is a number system with only two digits, 0 and 1. Computers store text by giving each character a number and writing that number in binary. The binary translator on this page does that conversion for you, so you can translate binary to text and text to binary without counting bits by hand.

Frequently asked questions

How do I convert text to binary?

Type your text into the Text box and the binary appears in the other box as you type. Each character is turned into its UTF-8 bytes, and each byte is written as eight 0s and 1s, so "Hi" becomes 01001000 01101001. To do it by hand, look up each character's code (H is 72), then write that number in base 2 using the place values 128, 64, 32, 16, 8, 4, 2 and 1.

How do I convert binary to English text?

Paste the 0s and 1s into the Binary box and the English text appears in the Text box. Bytes can be separated by spaces or run together in one long string, which the tool splits every 8 bits, or every 7 in 7-bit mode. To do it by hand, add up the place values of each 1 in a byte and look the number up in an ASCII table: 01001111 is 79, the letter O.

What is A in binary?

Capital A is 01000001 in 8-bit binary. Its ASCII code is 65, which is 64 + 1, so only the 64 and 1 positions hold a 1. Lowercase a is 97, written 01100001. The two differ in a single bit, the one worth 32, and the same is true for every letter, since lowercase codes are always exactly 32 higher than capitals. In 7-bit ASCII, capital A is 1000001.

How do you write "hello" in binary?

In lowercase, "hello" is 01101000 01100101 01101100 01101100 01101111. With a capital H, "Hello" is 01001000 01100101 01101100 01101100 01101111. Only the first byte changes, because H and h are one bit apart. Each letter takes one byte in both ASCII and UTF-8, so a five-letter word is 40 bits. Type any variation into the Text box to check it, including spaces and punctuation.

What is the difference between 7-bit and 8-bit binary?

ASCII has 128 characters, and 128 values fit into 7 bits, so 7-bit binary is enough for plain English letters, digits and punctuation. Computers store data in 8-bit bytes, and UTF-8 needs all eight bits for accented letters, other alphabets and emoji. In 8-bit form an ASCII character just gets a leading 0, so A is 1000001 in 7-bit and 01000001 in 8-bit. Use 8-bit unless your source clearly uses 7-digit groups.

What is the difference between ASCII and UTF-8?

ASCII is a 7-bit code first published in 1963, with 128 characters: English letters, digits, punctuation and control codes. UTF-8 is a way of storing every Unicode character, from Arabic and Chinese to emoji, using one to four bytes. Its first 128 codes are identical to ASCII and take one byte each, so English text gives exactly the same binary in both. They only differ once a character falls outside ASCII.

How many bytes is an emoji in binary?

It depends on the emoji. Most, such as 😀, take four bytes in UTF-8, which is 32 bits. Some older symbols, such as the plain heart ❤, take three. Many emoji are really several characters joined together: the red heart ❤️ is a heart plus an invisible variation selector, six bytes in total, and a thumbs up with a skin tone (👍🏽) takes eight. Emoji need 8-bit mode, because 7-bit ASCII cannot represent them.

Why does my binary decode to strange symbols?

The bits are almost always grouped wrongly. Each byte needs exactly 8 digits in 8-bit mode, or 7 in 7-bit mode, and one missing or extra digit shifts every byte after it. Put spaces between the bytes so a short group is easy to spot, and check that the mode matches your source. Binary saved in another encoding, such as UTF-16, will also look scrambled when it is read as UTF-8.

How do I read a binary number by hand?

Write the place values 128, 64, 32, 16, 8, 4, 2 and 1 above the eight digits of the byte, from left to right. Add up the values that sit above a 1 and ignore the rest. For 01001000 that is 64 + 8 = 72, the letter H in ASCII. Capital letters get quicker with practice: drop the leading 010 and the remaining five bits give the letter's position in the alphabet.

Is Morse code binary?

At the signal level, yes. Morse is sent by switching a tone or a light on and off, so it can be written as ones and zeros. It does not work like ASCII, though. Morse letters have different lengths, from one element for E to four for Q, and the length of each silence tells you where a letter or word ends. ASCII uses fixed 7-bit codes, stored here in 8-bit bytes, and needs no timing gaps between characters.

Can you convert Morse code to binary?

There are two ways to do it. You can translate the Morse into text and then convert the text to binary, so SOS becomes 01010011 01001111 01010011. Or you can write the Morse signal itself as bits, using 1 for each unit of sound and 0 for each unit of silence: a dot is 1, a dash is 111, a letter gap is 000 and a word gap is 0000000. In that form SOS, sent as one unbroken signal, is 10101011101110111010101.

Which came first, Morse code or binary?

Binary numbers came first. Gottfried Leibniz published his account of binary arithmetic in 1703, more than 140 years before Morse code was first used on the telegraph in 1844. Binary codes for text came much later. Émile Baudot patented his 5-bit telegraph code in 1874, and ASCII, the 7-bit code most binary translators are built on, was first published in 1963.

Updated: