↑↓ to move ↵ to open Esc to close Browse all tools

Text to Binary Converter

Type text to see it in binary, or paste binary to translate it back to text. A table shows the code point and the UTF-8 bytes of every character in hex, decimal and binary.

Convert text and binary

Direction

Every character

Each character with its code point and its UTF-8 bytes in hex, decimal and binary
CharCode pointHexDecimalBinary

Runs on your device. Nothing you enter is sent to a server.

Text to Binary Converter by Freebiefy, free online tools

Embed this tool on your site

Paste this code into your page. The tool runs in the visitor's browser, free and without signup. The height adjusts to the content.

How text becomes binary

A computer stores text as numbers. Every character has a number, its code point, written as U+ and a hexadecimal value: A is U+0041, é is U+00E9 and 😀 is U+1F600. An encoding then decides how each code point is stored as bytes, and UTF-8 is the encoding this converter uses. Each byte is 8 bits, and the binary you see is those bytes, one group of eight 0s and 1s per byte.

Take the word Hi. H is code point 72 and i is 105. In UTF-8 both are a single byte, and 72 in binary is 01001000, 105 is 01101001. So Hi in binary is 01001000 01101001. The hexadecimal form of the same bytes is 48 69, a shorter way to write them: two hex digits per byte. The number base converter switches any single number between binary, decimal and hex.

Reading a byte in binary, decimal and hex

Each digit of a byte stands for a power of two. From left to right the eight places are worth 128, 64, 32, 16, 8, 4, 2 and 1. Add up the places that hold a 1 and you have the decimal value: 01001000 has a 1 in the 64 place and in the 8 place, so it is 64 + 8 = 72, the letter H. The smallest byte, 00000000, is 0, and the largest, 11111111, is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255.

Hexadecimal is base 16, with the digits 0 to 9 and A to F for ten to fifteen. One hex digit covers exactly four bits, so every byte splits into two hex digits. Split 01001000 into 0100 and 1000, which are 4 and 8, and you get 48 in hex. That is why the table shows hex next to binary: it is the same byte, only shorter. Going the other way, a hex digit like C is 12, which is 1100 in binary, so the byte C3 is 11000011.

UTF-8: one to four bytes per character

UTF-8 is defined in RFC 3629. It encodes every code point from U+0000 to U+10FFFF in one to four bytes, and the first bits of each byte tell a decoder how long the character is:

Code pointsBytesBit pattern
U+0000 to U+007F10xxxxxxx
U+0080 to U+07FF2110xxxxx 10xxxxxx
U+0800 to U+FFFF31110xxxx 10xxxxxx 10xxxxxx
U+10000 to U+10FFFF411110xxx 10xxxxxx 10xxxxxx 10xxxxxx

The x bits hold the code point. RFC 3629 also makes UTF-8 compatible with US-ASCII: those characters are encoded in one byte with their usual ASCII value, so plain English text is the same in ASCII and UTF-8. Here are a few characters with their bytes:

CharCode pointHexDecimalBinary
AU+0041416501000001
aU+0061619701100001
zU+007A7A12201111010
0U+0030304800110000
spaceU+0020203200100000
!U+0021213300100001
éU+00E9C3 A9195 16911000011 10101001
ßU+00DFC3 9F195 15911000011 10011111
€U+20ACE2 82 AC226 130 17211100010 10000010 10101100
中U+4E2DE4 B8 AD228 184 17311100100 10111000 10101101
😀U+1F600F0 9F 98 80240 159 152 12811110000 10011111 10011000 10000000

Some characters you see as one symbol are several code points. A thumbs up with a skin tone is 2 code points, U+1F44D and U+1F3FD, so it takes 8 bytes. The table in the converter lists each code point on its own row.

Binary to text, and when it fails

To decode, the converter reads the 0s and 1s as bytes and then reads the bytes as UTF-8. Spaces, commas, semicolons and line breaks between the groups are all fine, and so is a 0b in front of each group. Without separators the digits are cut into groups of 8, so the count has to be a multiple of 8. A short group such as 1000001 is read as if it had leading zeros, which helps with binary copied from places that drop them.

Not every row of bytes is valid UTF-8. RFC 3629 says the byte values C0, C1 and F5 to FF never appear, that a byte of the form 10xxxxxx may only follow a start byte, that a character may not be written with more bytes than it needs (an overlong form), and that the code points U+D800 to U+DFFF, the surrogates, are not encoded at all. The converter checks all of that and names the first byte that breaks a rule, with its position, so you can find a missing or extra digit. Characters it cannot read show up as �, the replacement character.

7-bit ASCII

The US-ASCII range is code points 0 to 127, which fit in 7 bits. If you need ASCII in that form, A as 1000001 instead of 01000001, the 7-bit ASCII option writes and reads 7-bit groups. Anything outside ASCII, like é, € or an emoji, has no 7-bit form, so the converter leaves it out and tells you which characters it skipped. For text that is not plain English, keep the option off and use UTF-8.

How to use the text to binary converter

  1. 1Type or paste text to translate it to binary, or paste binary to translate it to text. Auto detect picks the direction; choose one yourself if you prefer.
  2. 2Pick a separator, and turn on the 0b prefix or 7-bit ASCII if you need that format.
  3. 3Check the table for the code point and the UTF-8 bytes of every character in hex, decimal and binary.
  4. 4Copy the result or download it as a text file. Swap moves the result into the input to translate it back.

Frequently asked questions

How do you convert text to binary?

Turn every character into its bytes, then write every byte as 8 binary digits. Letters, digits and basic punctuation are one byte in UTF-8: A is 65, which is 01000001 in binary. Letters with accents, other scripts and emoji take two to four bytes. The converter does this as you type and shows each step in the table.

What is "hello" in binary?

In UTF-8, and in ASCII too, hello is 01101000 01100101 01101100 01101100 01101111. Each group of 8 digits is one letter: h is 104, e is 101, l is 108 and o is 111. A capital H would be 01001000, because capital letters come 32 places before the small ones.

Why does é or an emoji give more than 8 bits?

UTF-8 writes only the first 128 code points, the US-ASCII characters, in one byte. Higher code points take two, three or four bytes, as RFC 3629 sets out. é (U+00E9) becomes 11000011 10101001, the euro sign three bytes and 😀 (U+1F600) four bytes: 11110000 10011111 10011000 10000000.

How do I convert binary to text?

Paste the binary into the box. The converter notices that it is binary and decodes it. Groups of 8 digits can be separated by spaces, commas or line breaks, or written without any space at all, and 0b prefixes are fine. A group with fewer than 8 digits, like 1000001, is read with leading zeros.

What does invalid UTF-8 mean?

Not every byte sequence is valid UTF-8. A byte starting with 10 must follow a start byte, a start byte needs the right number of follow-up bytes, and RFC 3629 forbids the bytes C0, C1 and F5 to FF, overlong forms and surrogates. The converter names the first byte that breaks a rule and shows � where a character could not be read.

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

The 128 US-ASCII characters fit in 7 bits, so A can also be written as 1000001 instead of 01000001. Turn on 7-bit ASCII to get that form. Characters outside ASCII, like é or emoji, cannot be written in 7 bits, so the converter lists them instead of guessing.