Binary to Text Converter

Encode text to binary or hex bytes and decode back with strict UTF-8, so accents and emoji round-trip correctly and invalid bytes get a clear error, not garbage.

The interactive tool loads here when JavaScript runs.

About this tool

What is the Binary to Text Converter?

Paste a run of 0s and 1s to read it as text, or type text to see its bytes, with both panels converting live at once. A mode switch shows the same bytes as binary (eight bits per byte) or as hex pairs, so "Hi" is 01001000 01101001 in one view and 48 69 in the other. Copy buttons sit beside every output.

The encoding underneath is genuine UTF-8 in both directions. That means é comes out as two bytes, a Chinese character as three and 🚀 as four, exactly as a file or an API would store them. Decoding is strict: bytes that no UTF-8 text could produce are rejected with a plain explanation instead of being papered over with replacement characters, which is what makes this page usable for debugging and not just for puzzles.

Conversion happens in your browser and the text never leaves the page. The toolbar underneath offers a shareable link to the tool and the usual citation options.

  • Text to bytes and bytes to text, live in both directions
  • Binary and hex views of the same UTF-8 encoding
  • Strict decoding that rejects invalid UTF-8 with the reason
  • Multi-byte characters handled correctly, from é to 🚀
  • Separator-tolerant input: spaces, commas or nothing between bytes
Read the guide: Unit Conversion Factors: Exact Definitions, Gallons and Temperature Offsets

Updated

How to use the Binary to Text Converter

  1. Choose binary or hex mode; both show the same UTF-8 bytes in different clothes.
  2. Type or paste text on the left to encode it; the byte view updates as you type.
  3. Paste bits or hex pairs on the right to decode them; spaces and commas between bytes are ignored.
  4. Read the error message if decoding fails: it tells you whether the length is wrong or the bytes are not valid UTF-8.
  5. Copy either output with the button beside it.

Worked examples

Two letters, two bytes

Input

Hi

Output

01001000 01101001

H is code 72 and i is 105; written as 8-bit binary they are 01001000 and 01101001. ASCII letters always take exactly one byte in UTF-8.

Reading bits back

Input

01001000 01101001

Output

Hi

Sixteen bits split into two bytes, 72 and 105, which decode to H and i. The decoder accepts the bits with or without spaces, but the total must divide into 8-bit groups.

An accent in hex mode

Input

café

Output

63 61 66 c3 a9

The first three letters are one byte each, but é needs the two-byte sequence C3 A9. Five bytes for four characters is UTF-8 working as designed.

Bytes that are not text

Input

11111111

Output

Rejected: not valid UTF-8

The byte FF cannot occur anywhere in UTF-8, so there is no text these bits could spell. The page says so instead of inventing a replacement character.

Background and insight

The 8-bit groups come from ASCII, the 1963 American character code that assigned the numbers 0 to 127 to English letters, digits and punctuation. Capital H is 72, which in binary is 1001000, padded to the byte 01001000. For plain English text, UTF-8 produces exactly the ASCII bytes, which is why most "binary code" seen on t-shirts and in puzzles decodes with any ASCII chart. The interesting part begins with the 128th character.

UTF-8, sketched by Ken Thompson and Rob Pike in 1992 and standardised in RFC 3629, extends ASCII to every Unicode character by using one to four bytes per character. The first byte announces the length in its leading bits, and every continuation byte starts with 10, so a reader dropped into the middle of a stream can find the next character boundary on its own. é is C3 A9, the euro sign is E2 82 AC, and 🚀 is F0 9F 9A 80. The design keeps ASCII files valid unchanged, which is the main reason UTF-8 won and now carries the overwhelming majority of the web.

Strictness is a feature, not a limitation. The byte FF never appears in any UTF-8 text, a continuation byte cannot stand alone, and over-long encodings of ASCII characters are forbidden by the RFC because they were used to sneak path traversal strings past validators. When this page says "these bytes are not valid UTF-8 text", the bytes really are not text in that encoding; they may be Latin-1, a different encoding, or not text at all. A lenient decoder would hand you a row of question-mark diamonds and hide exactly the fact you were trying to establish.

Common use cases

  • Computer science homework

    Check hand-converted ASCII exercises and see why one character is not always one byte.

  • Debugging encoding bugs

    Paste the raw bytes a log or API returned and learn whether they are valid UTF-8 before blaming the database.

  • Puzzles and geek gifts

    Decode the binary on a t-shirt or an escape-room clue, or encode a name for an engraving.

  • Verifying file content byte by byte

    Compare what an editor shows against the actual bytes when an invisible character is breaking a parser.

Tips and limitations

  • Binary text comes in whole bytes: the bit count must divide by 8, so a 7-bit ASCII table answer needs a leading zero added.
  • Separators are optional on input. 0100100001101001 decodes the same as the spaced version; commas work too.
  • Hex mode carries the same information in a quarter of the characters, which is kinder for long strings; a 0x prefix and capital letters are both fine.
  • One emoji can be many bytes, and some, like flags or family emoji, are several characters joined together, so the byte count can be surprisingly large.
  • If valid-looking bytes refuse to decode, suspect a different encoding such as Latin-1, where é is the single byte E9 rather than C3 A9.

Sources and further reading

  1. RFC 3629: UTF-8, a transformation format of ISO 10646, IETF. The normative byte patterns and the ban on over-long sequences
  2. UTF-8, Wikipedia. History, the Thompson and Pike design, and adoption statistics
  3. ASCII, Wikipedia. The 7-bit character assignments UTF-8 preserves

Frequently asked questions

How do I translate binary code into text?

Split the bits into 8-bit bytes, read each byte as a number, and decode the byte sequence as UTF-8. 01001000 01101001 splits into 72 and 105, which are H and i. This page does all three steps and flags input that cannot be split into whole bytes.

How many bits is one letter?

An unaccented English letter is 8 bits, one byte. Beyond ASCII the count grows: é is 16 bits, most CJK characters are 24, and emoji such as 🚀 are 32. UTF-8 spends between one and four bytes per character depending on its Unicode value.

Why does the decoder say my bytes are not valid UTF-8?

UTF-8 has strict structure: certain bytes like FF never occur, continuation bytes cannot appear without a lead byte, and sequences must not be over-long. Input that breaks those rules is not UTF-8 text, and is often either a different encoding or binary data such as an image.

Is binary the same as hex?

They are two spellings of the same bytes. One hex digit covers four bits, so the byte 01001000 is 48 in hex. The mode switch on this page re-displays identical data; nothing about the text changes.

Can I convert emoji and accented letters to binary?

Yes, and they round-trip exactly because the page uses real UTF-8. é encodes to 11000011 10101001 (C3 A9 in hex) and decodes back to é. Tools that only handle ASCII corrupt these characters or drop them.

Why does my text have more bytes than characters?

UTF-8 is variable-width. Every character beyond the 128 ASCII values needs two, three or four bytes, so "café" is four characters but five bytes. Byte length is what storage quotas, database columns and network payloads actually measure.

Is there an in-depth guide to the Binary to Text Converter?

Yes. “Unit Conversion Factors: Exact Definitions, Gallons and Temperature Offsets” covers the background, how it works, common pitfalls and worked examples. Read the full guide.