How text becomes binary
Computers store text as numbers. Each character is first given a code point by Unicode — A is U+0041 (65), é is U+00E9 (233), € is U+20AC (8364) and 👋 is U+1F44B (128075). An encoding then turns those code points into bytes, and binary is simply those bytes written in base 2. So ‘Hi’ in UTF-8 is the two bytes 72 and 105, which in binary are 01001000 01101001 and in hex 48 69.
Both boxes are live. Type in the text box to encode; paste into the right-hand box to decode. When decoding, spaces, commas, new lines and vertical bars all separate values, prefixes like 0b and 0x are ignored, and an unbroken run of binary or hex is split into bytes automatically. If you paste hex while Binary is selected, the converter spots it and offers to switch.
The table underneath breaks the first 64 characters down one by one — code point, what kind of character it is, how many bytes it needs and the encoded value — which is the quickest way to see why an emoji takes four bytes in UTF-8 but a letter takes one.
UTF-8, UTF-16 and ASCII explained
| Encoding | Bytes per character | Use it when |
|---|---|---|
| UTF-8 | 1 for ASCII, 2 for most accented and Cyrillic/Greek/Arabic letters, 3 for most Asian scripts and €, 4 for emoji | Almost always. It is the encoding of the web, email, JSON and nearly every modern file. |
| UTF-16 | 2 for everything in the Basic Multilingual Plane, 4 (a surrogate pair) for emoji and rarer characters | Working with JavaScript, Java, C#/.NET or Windows APIs, which use UTF-16 internally. |
| ASCII | 1, but only for the 128 characters U+0000–U+007F | Very old systems, or teaching exercises that expect 7-bit codes. Anything else becomes ? and is flagged. |
Big-endian vs little-endian only matters for UTF-16, where each 16-bit unit is two bytes. Big-endian (BE) writes the high byte first — A is 00 41 — and little-endian (LE), used by Windows and most processors, writes 41 00. If UTF-16 text decodes as Chinese-looking nonsense, you almost certainly have the wrong byte order.
Many converters online quietly use UTF-16 code units or Latin-1 and call it ‘ASCII’, which is why they give different answers for é or emoji. Here the encoding is always explicit, and the byte count updates with it.
Binary, octal, decimal and hex output
- Binary (base 2) shows each byte as eight bits, zero-padded, so
Ais01000001. Choose None as the separator for one continuous bit string. - Hex (base 16) packs a byte into two digits (
41) and is what programmers use in escape sequences, colour codes and debuggers. - Octal (base 8) writes a byte as three digits (
101); you will meet it in Unix file permissions and some legacy escape sequences. - Decimal lists the byte values as ordinary numbers (
65). When decoding, numbers above 255 are read as Unicode code points, so8364becomes €.
Grouping controls what sits between separators: every byte on its own, every 16-bit code unit (useful for UTF-16), or all the bytes of one character together, so you can see at a glance where each character starts. Decimal and octal numbers cannot be joined together without becoming ambiguous, so in those formats a group is always one number. Tick Prefix to add 0b, 0o or 0x in front of each value, ready to paste into code.
For binary-safe text in emails and URLs, Base64 is usually a better fit than binary, and it produces far shorter output.
Large input, errors and edge cases
The converter works in chunks, so pasting a whole book — 100,000 characters or more — keeps the page responsive while it runs, and the byte and bit counts stay exact. Very large binary output (eight characters per byte plus separators) can be slow to scroll in some browsers; downloading it as a file avoids that.
When decoding goes wrong the converter says why rather than guessing silently: tokens that are not valid in the chosen base are listed and skipped, bytes that do not form valid UTF-8 are shown as � with a count, an odd number of bytes in UTF-16 is flagged, and bytes above 127 in ASCII mode are marked as not ASCII. A byte-order mark at the start of UTF-8 data is removed and reported.
Emoji built from several code points — a family, a flag, a skin-tone variant — are counted as one character but several code points, and each part is shown in the breakdown. If you suspect hidden characters in pasted text, the invisible character detector will reveal them. Everything happens in your browser; nothing you type is sent anywhere.
Frequently asked questions
How do I convert text to binary?
Type or paste the text into the Text box with Binary and UTF-8 selected. Each character is turned into its UTF-8 bytes and each byte is written as eight binary digits, separated by spaces. For example, Hi becomes 01001000 01101001. Copy the result or download it as a text file.
How do I convert binary back to text?
Paste the binary into the right-hand box. Groups of eight bits separated by spaces work best, but commas, new lines, 0b prefixes and one long unbroken string are also accepted. The text appears on the left straight away. If you see � symbols, try switching the encoding to UTF-16 or check that no bits are missing.
What is the difference between ASCII and UTF-8 binary?
For the 128 basic characters — English letters, digits and common punctuation — there is no difference: UTF-8 was designed so those bytes are identical to ASCII. The difference appears with anything else. UTF-8 encodes é, € or emoji as two to four bytes, whereas ASCII cannot represent them at all.
Why does one emoji turn into 32 bits?
Most emoji have code points above U+FFFF, and UTF-8 needs four bytes, or 32 bits, to store those. In UTF-16 they are stored as a surrogate pair — also four bytes. Some emoji, such as flags or family groups, are several code points joined together, so they can take 16 bytes or more.
Can I convert text to hex or decimal instead?
Yes. Choose Hex, Octal or Decimal at the top and the output switches immediately, using the same encoding. Hex writes each byte as two digits, octal as three, and decimal as a plain number from 0 to 255. Decoding works for all four formats.
What does big-endian and little-endian mean for UTF-16?
UTF-16 stores each character as one or two 16-bit units, and each unit is two bytes. Big-endian puts the most significant byte first, so A is 00 41; little-endian reverses it to 41 00. Windows files usually use little-endian. The wrong choice produces garbled text when decoding.