Text Encoding

Binary translator

Text 5 chars
Binary 44 chars
01001000 01100101 01101100 01101100 01101111
Live · UTF-8, eight bits per byte
Advertisement
320 × 100

Text becomes binary by encoding each character as a number and writing that number in base two. This translator uses UTF-8, so a plain letter such as A is one byte — 01000001 — while an accented character or an emoji takes two to four bytes. Decoding reverses the process, reading eight bits at a time.

How to translate binary

1 Type or paste your text. The binary appears beside it as you type.
2 Press Swap to go the other way and paste binary in instead.
3 Drop a .txt file onto the box to load a longer piece of text.

Most binary you find online is ASCII, seven bits per character padded to eight, which is why it decodes cleanly here. Anything beyond the first 128 characters is where encodings diverge: 01000011 01100011 is fine, but an é can be one byte in Latin-1 and two in UTF-8. This tool writes UTF-8 and reads it, falling back to raw bytes when a stream is not valid UTF-8 rather than refusing it.

Questions

Because UTF-8 is variable-length. Characters outside the basic Latin range take two, three or four bytes, and most emoji take four.

Unicode Consortium — UTF-8 and the encoding forms
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING