esc
No tool matches that yet.
  1. Home
  2. Text & unicode
  3. Text to binary converter

Text to binary converter

Type text to see its binary, hex, octal or decimal bytes, or paste those numbers to turn them back into text. Pick the encoding and watch exactly how each character is stored.

0 characters
0 bytes

0characters
0code points
0bytes (UTF-8)
0bits

Character by character

CharCode pointName / typeBinary
Type some text to see how each character is stored.
Converted in your browser — works offline and nothing is uploaded.Decoding accepts spaces, commas, new lines, 0b/0x prefixes, U+/&#x;/\u code points or one continuous run. Drop a file on either box.

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. An unbroken binary run whose length is a multiple of seven but not eight — the classic 7-bit ASCII exercise, such as 10010001101001 — is split into 7-bit codes and decodes to ‘Hi’; any other length that is not whole bytes is flagged. Code-point notations are understood in every mode: U+1F600, 😀, 😀, \u00E9, \u{1F600} and surrogate pairs like \uD83D\uDE00 all become the character itself. 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, ASCII and Latin-1 explained

EncodingBytes per characterUse it when
UTF-81 for ASCII, 2 for most accented and Cyrillic/Greek/Arabic letters, 3 for most Asian scripts and €, 4 for emojiAlmost always. It is the encoding of the web, email, JSON and nearly every modern file.
UTF-162 for everything in the Basic Multilingual Plane, 4 (a surrogate pair) for emoji and rarer charactersWorking with JavaScript, Java, C#/.NET or Windows APIs, which use UTF-16 internally.
ASCII (7-bit)1, written as 7 binary digits; only the 128 characters U+0000–U+007FTeaching exercises that expect 7-bit codes such as 1001000. Anything else becomes ? and is flagged. For the 8-digit form choose UTF-8 — identical for plain English.
Latin-1 (ISO-8859-1)1, for U+0000–U+00FFOld Western European files and textbook ‘extended ASCII’ tables: £ is 10100011 and é is 11101001.
Windows-12521; like Latin-1 but 0x80–0x9F hold €, curly quotes, dashes, Š, Ž and ŸText saved by older Windows programs and Excel CSV exports: € is 10000000. If UTF-8 decoding shows �, try this.

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 the data starts with a byte-order mark (FE FF or FF FE) the converter follows it automatically and tells you; without one, text that decodes as Chinese-looking nonsense almost certainly has 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 — including after decoding code points, where it shows how many bytes the text really takes.

Binary, octal, decimal and hex output

  • Binary (base 2) shows each byte as eight bits, zero-padded, so A is 01000001. Choose None as the separator for one continuous bit string, or Custom… for your own (type \n for a new line). With ASCII (7-bit) selected, each character is seven bits.
  • 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, so 8364 becomes €.

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 with a progress line, so pasting a whole book keeps the page responsive: a megabyte of text converts to binary in about two seconds. Binary output is roughly nine times the size of the input, so when it passes 2 MB the box shows the first 2 MB and says so, while Copy and Download still use the complete result. Open file (or dropping a file on either box) reads UTF-8 text straight into the Text box; any other file — an image, a ZIP — shows its raw bytes instead. Raw bytes (.bin) saves exactly the bytes the numbers describe, which turns a hex dump back into the original file.

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 and a one-click retry as Windows-1252, 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 or open 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 — the byte values are identical: UTF-8 was designed that way. ASCII is a 7-bit code, so the ASCII setting writes seven binary digits (1001000), while UTF-8 writes eight (01001000). UTF-8 encodes é, € or emoji as two to four bytes; 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.

How do I get extended ASCII codes for £, é or €?

Choose Latin-1 or Windows-1252 as the encoding. These single-byte code pages are what most textbooks mean by extended ASCII: £ is 10100011 and é is 11101001 in both. The euro sign only exists in Windows-1252, where it is 10000000. Characters outside the code page are replaced with a question mark and listed.

Can I decode U+ code points or HTML entities?

Yes, in any mode. Paste U+1F600, 😀, 😀, \u00E9, \u{1F600} or a surrogate pair such as \uD83D\uDE00 into the right-hand box and each becomes the character it names. You can mix them with ordinary bytes, and the status line tells you which were read as code points.

Text & unicode