From characters to numbers
A computer stores text as numbers. A character set gives each character a number, called a code point, and an encoding says how that number is laid out in bytes. ASCII, the oldest set still in daily use, covers 128 characters: A is 65, a is 97, the digit 0 is 48 and a space is 32. Upper and lower case differ by exactly 32, which is a single bit: A is 01000001 and a is 01100001.
Unicode extends the same numbering to every writing system and to symbols and emoji, and UTF-8 is the encoding the web uses for it. UTF-8 keeps ASCII unchanged, one byte per character, and spends two, three or four bytes on everything else. This converter uses the browser's own UTF-8 encoder, so its output matches what a web server, a JSON file or a terminal holds for the same text.
How UTF-8 lays out multi-byte characters
The first byte of a UTF-8 sequence announces its length. A byte starting with 0 stands alone. One starting with 110 opens a two-byte sequence, 1110 a three-byte sequence and 11110 a four-byte one, and every following byte starts with 10. The remaining bits carry the code point. That pattern is easy to see in binary output, which is a good reason to prefer it over hex while you are learning the format.
Take the letter e with an acute accent, code point U+00E9. It becomes 11000011 10101001, or C3 A9 in hex. The euro sign, U+20AC, takes three bytes: E2 82 AC. The waving hand in the sample text is U+1F44B and takes four: F0 9F 91 8B.
- U+0000 to U+007F: 1 byte (ASCII).
- U+0080 to U+07FF: 2 bytes (accented Latin, Greek, Cyrillic, Hebrew, Arabic).
- U+0800 to U+FFFF: 3 bytes (most Chinese, Japanese and Korean characters, the euro sign).
- U+10000 and above: 4 bytes (emoji, rare scripts).
Choosing between binary, hex, decimal and octal
All four formats describe the same bytes. Binary shows every bit and is what people mean by binary code, at a cost of eight characters per byte. Hex packs a byte into two characters because one hex digit equals four bits, which is why hex dumps, colour codes and MAC addresses use it. Decimal is what most programming languages print for a byte value, and octal survives mainly in Unix file permissions and old escape sequences.
The word Hi is 01001000 01101001 in binary, 48 69 in hex, 72 105 in decimal and 110 151 in octal. Hex output here is upper case with no 0x prefix. With No separator selected, the binary for Hi becomes 0100100001101001, which is how a raw bit stream is usually written.
What counts as a character
The converter encodes exactly what is in the box, including things you cannot see. A space is 00100000, a tab is 00001001 and a line break is one byte, 00001010 (line feed). Text copied from a web page or a word processor may carry non-breaking spaces or zero-width characters, which show up as unexpected multi-byte groups such as C2 A0 or E2 80 8B. Invisible Character Generator can detect and strip those.
Some characters that look single are several code points. A flag emoji is two regional indicator symbols, eight bytes in all, and a family emoji is several people joined by zero-width joiners and can exceed twenty bytes. An accented letter typed as a base letter plus a combining mark is longer than the precomposed form of the same letter.
Limits and related conversions
Binary code is a notation, not encryption. Anyone can turn it back, with Binary to Text Converter or by hand with an ASCII table, so it hides nothing. The converter also only writes UTF-8: it does not produce UTF-16 or legacy code pages such as Windows-1252, where the same accented letter is stored as different bytes.
Nothing you type leaves the browser. To carry arbitrary bytes through email or JSON, use Base64 Encoder / Decoder, which is far more compact than writing out bits: four characters for every three bytes. To fingerprint text instead of transcribing it, use MD5 Generator.