Convert text to binary, hex, decimal or octal bytes and back, in UTF-8, so accents, emoji and other scripts work
Paste text to see its bytes in binary, one group of 8 bits a byte, or switch to Bytes → Text to read binary back as words.
How to use it
Paste text, or open any file to see its bytes. Pick Write as (binary, hex, decimal or octal) and what goes between the bytes, or type your own in Or. Copy or download the bytes. Bytes → Text reads them back; Swap turns the result into the input.
Examples
A word in binary
Input
Hi
Result
01001000 01101001
An accent takes two bytes
Input
café
Result
01100011 01100001 01100110 11000011 10101001
é is the last two bytes: 11000011 10101001 (c3 a9 in hex).
Binary back to text
Input
01001000 01100101 01101100 01101100 01101111
Result
Hello
Bytes → Text, Read as: Any form.
Why one character can be several bytes
| Character | Bytes in hex | Bytes |
|---|---|---|
A | 41 | 1: ASCII letters, digits, punctuation |
é | c3 a9 | 2: accented Latin, Greek, Cyrillic, Hebrew, Arabic |
€ | e2 82 ac | 3: most other scripts (Chinese, Hindi) and symbols |
😀 | f0 9f 98 80 | 4: most emoji |
Forms it reads
| You paste | Read as |
|---|---|
01001000 01101001 | binary, a byte a group |
0100100001101001 | binary, one long run cut into bytes |
0100 1000 0110 1001 | binary, two 4-bit halves to a byte |
48 69, 4869 | hex |
0x48 0x69, \x48\x69, %48%69 | hex, as code and URLs write it |
72, 105 | decimal |
Questions
- How much text can it convert?
Up to 2 MB of text at once; written as bytes it comes out several times longer. - Can it use another character set than UTF-8?
Yes. Pick it under Charset: UTF-16 LE or BE, Latin-1, Windows-1250 to 1252, ISO-8859-2, KOI8-R, Shift_JIS, GBK, Big5 or EUC-KR, both ways (EUC-JP and GB18030 read only). A character the set has no bytes for is written as ? and a note names the first one. - Can I see the bytes of a file, or save bytes as one?
Yes. Text → Bytes opens any file and writes its bytes as they are. Bytes → Text with Charset set to File (save bytes) reads the bytes and Download saves them, named by the type they start with, such as decoded.png. - How do I convert binary to text by hand?
Cut the bits into groups of 8, turn each group into a number (01001000 is 64 + 8 = 72) and look the number up in an ASCII table: 72 is H. That works for English; accented letters and emoji take several bytes that only make sense together, which is what UTF-8 decoding does. - Why is my binary 7 bits a letter, not 8?
Old ASCII used 7 bits, and some puzzles and textbooks still write it that way. Turn on 7-bit to write it so (only ASCII text fits in 7 bits); Bytes → Text reads 7-bit groups too and says so in a note above the text. - What does � in the result mean?
Those bytes aren’t valid UTF-8, so they can’t be shown as text: often a byte is missing or extra, the bytes are part of a file such as an image, or the text was saved in another encoding such as Windows-1252. A note above the result says so. - Is the text I convert uploaded?
No. Everything runs in your browser, so your text stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first.