Skip to content

Text to Binary Converter

Convert text to binary (01001000 01101001) and binary back to text, using UTF-8 bytes or UTF-16, with hex and decimal views. Works with accents and emoji.

Runs in your browser

Everything happens on your device: nothing you paste or type is sent to our server or stored. A share link holds your settings, and your input only if you choose to include it.

UTF-8 is what files and the web use; plain English letters come out the same as ASCII. UTF-16 is how Java, JavaScript and Windows store text in memory.

Decimal numbers always keep their spaces, or they couldn’t be read back.

4 characters · 6 bytes (UTF-8) · limit 10 MB

Output: 53 characters.

Characters
4
Bytes
6
Bits
48

Method: UTF-8 bytes, Unicode 17.0 §3.9 / RFC 3629 · FindMySum codec (no library)

Off by default. When on, your input is packed into the part of the link after “#”, which browsers never send to any server; anyone you give the link to will see it.

How it works

A computer stores text as numbers. This tool first turns your text into UTF-8, the encoding used by almost every web page and file today: each English letter, digit and punctuation mark is one byte with the same value it has in ASCII, an accented letter such as é is two bytes, most other scripts take three, and an emoji takes four. Each byte is then written as eight binary digits, or as two hex digits or a decimal number if you pick those views. The UTF-16 option writes the 16-bit code units that Java, JavaScript and Windows use in memory instead, where an emoji becomes a pair of units called surrogates.

Converting back reads groups of digits separated by spaces, commas or line breaks. A group shorter than eight bits, as in 7-bit ASCII charts, is read as one byte with zeros in front, and a long run with no spaces is cut into eight-bit pieces. If the digits don't divide evenly, contain anything other than 0 and 1, or produce bytes that aren't valid UTF-8, the tool shows where the problem is instead of printing garbled characters.

Everything runs in your browser with our own code, following the encoding forms in the Unicode Standard 17.0 and RFC 3629. Nothing you type is sent anywhere.

Standards this tool follows

Text to Binary Converter: How Letters Become 0s and 1s

By FindMySum · Last reviewed

Type or paste words above and the text to binary converter shows the 0s and 1s a computer stores for them, one group of eight bits per byte. Switch the direction to turn binary back into readable text. It works with any language and with emoji, and everything happens in your browser.

Reading the output

Each group of eight digits is one byte. Read it as a number by adding the place values of the 1s, which from left to right are 128, 64, 32, 16, 8, 4, 2 and 1. The letter H is 01001000: 64 + 8 = 72, and 72 is H's code. The hex view writes the same byte as 48 and the decimal view as 72, which is handy when you are comparing with a programming manual or a character chart.

A worked example

The word Hi ✓ turns into six bytes. H is 01001000 and i is 01101001. The space is 00100000, which is 32. The check mark is a single character, but it sits at U+2713 in Unicode, too high for one byte, so UTF-8 spreads it over three: 11100010 10011100 10010011. The first byte starts with 1110, which tells a decoder that this character takes three bytes, and each following byte starts with 10 to mark it as a continuation. That pattern is why an accidentally dropped byte produces an error rather than a different letter.

How to use it

  1. Leave the encoding on UTF-8 unless you need to match a program that uses UTF-16.
  2. Choose binary, hex or decimal output. Hex is the most compact way programmers write bytes.
  3. To decode, paste digits with or without spaces. Separate groups with spaces if they are shorter than eight bits, as in many ASCII tables.
  4. Copy the result or use Swap to check that it converts back to the same text.

Common mistakes

Dropping leading zeros. The letter A is 01000001, not 1000001 run together with its neighbours. Without spaces, a missing zero shifts every following bit and the rest of the message turns to nonsense.

Mixing up characters and values. The text 5 is the byte 00110101, while the number five in binary is 101. For the second, use the number system converter; for adding or multiplying binary numbers, the binary calculator.

Assuming one byte per letter. Only ASCII characters are one byte in UTF-8. A message with accents or emoji has more bytes than letters, which matters when a system limits a field by bytes rather than characters.

The Base64 decoder is the next step up: it packs the same bytes into printable characters, four characters for every three bytes.

Sources

Frequently Asked Questions

What is 'hello' in binary?

In UTF-8 or ASCII, hello is 01101000 01100101 01101100 01101100 01101111: one byte each for h, e, l, l and o. Capital letters differ from lowercase in a single bit, the third from the left, so H is 01001000 while h is 01101000.

Is binary text the same as ASCII?

For the 128 ASCII characters, yes: UTF-8 gives them the same single byte, so plain English text converts exactly as an ASCII chart says. The difference appears with anything outside ASCII, such as é, € or 😀, which ASCII can't represent at all and UTF-8 writes as two to four bytes.

Why does my binary decode to strange symbols elsewhere?

The binary was probably made with a different encoding, such as UTF-16 or an old code page like Windows-1252, or a digit was lost when copying. Try the UTF-16 option here; if that fails too, the error message points to the group where the bytes stop making sense.

Can I convert a number to binary with this tool?

This tool converts the characters of a number, so typing 12 gives the bytes for the digits 1 and 2. To turn the value twelve into 1100, use the number system converter.

Spotted a wrong result or a bug? Report a problem (the link sends the page address only, never what you entered).

May we count your visits with Invoker Analytics? It keeps a random visitor number in your browser. Your calculator inputs are never sent. Privacy policy