Skip to content

Tool 40 / Format lines

Every character, eight bits at a time.

Convert text into the UTF-8 bytes that computers actually store, or paste a bit string and read it back. Accents and emoji included, with no upload.

  • Free to use
  • UTF-8
  • Runs locally
Live workbench7 UTF-8 bytes

Each character becomes its UTF-8 byte sequence, and each byte becomes eight binary digits. ASCII stays one byte; accented letters and emoji use more.

Binary
4 characters in7 bytes outUTF-8 encoding8 bits per byteUTF-8 bytes · never uploaded

What it does

A binary code translator turns readable text into its underlying bytes and then writes each byte as eight binary digits. The reverse direction collects those bits into bytes and decodes them as UTF-8 text. It is the same information in a different notation, not a cipher.

Computers do not store letters as letters. They store numbers, and those numbers are encoded as bytes. UTF-8 is the dominant text encoding on the web: it represents ordinary ASCII with one byte and expands to two, three, or four bytes for other characters. This tool shows that expansion directly, which makes it useful for teaching, debugging, and inspecting data.

UTF-8 bytes

The letter H is U+0048 and one UTF-8 byte, 0x48, which is 01001000 in binary. The emoji 🌍 is U+1F30D. It needs four UTF-8 bytes: 0xF0 0x9F 0x8C 0x8D, or 11110000 10011111 10001100 10001101. The four groups are one character, not four. That distinction between characters, code points, and bytes is the main thing to keep straight.

A space is also a byte: 00100000. Line breaks are bytes too, although the page displays the output as a wrapped block for readability. If you paste a multi-line document, the newline characters are encoded along with the visible letters. Nothing is trimmed or normalized.

Grouping and separators

Eight bits make one byte. The encoder always pads to eight digits, and the decoder regroups the input in eights after removing spaces, commas, pipes, and line breaks. That means you can paste a continuous string or a neatly grouped one. It also means a single missing or extra bit shifts every following byte, so an incomplete group is reported instead of guessed around.

A 0b prefix before a byte is accepted for convenience. The output can be wrapped at 8, 16, or 32 bytes per line. Wrapping changes only the presentation; it does not insert bytes into the decoded result. Choose “None” when the destination expects a compact string of bits.

Examples

Text to binary with spaces between bytes
Separator: space · no wrapping

Before

Hi 🌍

After

01001000 01101001 00100000 11110000 10011111 10001100 10001101

H and i are one byte each. The space between them is its own byte. The emoji is four bytes, which is why the output grows quickly for text with symbols. The groups are shown on one line here; the wrapped example below is easier to read in a wide block.

The same bytes, wrapped for reading
Separator: space · 4 bytes per line

Before

Hi 🌍

After

01001000 01101001 00100000 11110000
10011111 10001100 10001101

Wrapping adds line breaks between groups but not between the original words. The decoder ignores those line breaks as separators, so this output still round-trips to “Hi 🌍.” If you are pasting into a program that treats line breaks as data, use the unwrapped form instead.

Binary back to an emoji
Four bytes → one character

Before

11110000 10011111 10001100 10001101

After

🌍

The four bytes are a valid UTF-8 sequence for one code point. A single byte of 11110000 on its own would be incomplete, and the decoder would report an error. That strictness is deliberate: guessing an encoding can turn a data problem into a silent corruption.

Limits worth knowing

  • It is not encryption. Binary is a public representation. Anyone can convert it back. It does not hide text from a person or a machine.
  • UTF-8 only. The decoder does not try Latin-1, UTF-16, or a legacy code page. A valid byte sequence in another encoding may fail here, and a failed decode is better than a wrong guess.
  • Bits are not decimal bytes. A byte is eight binary digits, not a number from 0 to 255 written in decimal. 01001000 is 72 decimal, but the tool is showing the bit pattern, not a decimal value.
  • Characters and bytes differ. An emoji can be four bytes and one code point, while a family emoji can be several code points that render as one picture. The byte count is not the character count.
  • Very large text creates very large output. Eight bits per byte plus separators can multiply the size of a document. Work in excerpts if the tab becomes slow.

Page updated

Questions, answered

Is this converting text to ASCII binary?

It uses UTF-8, which is a superset of ASCII for the first 128 characters. An English letter or digit produces the same byte as ASCII would. Accented letters, emoji, and other scripts produce multiple bytes, which is why the output is longer and why this is more accurate than an ASCII-only translator.

Why does each byte have eight digits?

A byte holds eight bits. Binary notation pads each byte to eight places, so 65 decimal is 01000001 rather than 1000001. The leading zero matters for grouping and for reading the byte boundaries. The decoder needs the full eight-bit groups.

Can I remove the spaces between the bytes?

Yes. With the separator set to “None,” the output is one continuous bit string. The decoder regroups it in eights, so it can still read it. Separators are for human readability; they are not part of the data.

What does 0b mean?

In many programming languages, 0b is a prefix that marks a number as binary. This decoder accepts it before a byte, so 0b01001000 and 01001000 mean the same thing. The prefix is optional and is stripped before decoding.

Why did my binary input fail to decode?

The usual reasons are an incomplete byte, a character other than 0 or 1, or a byte sequence that is not valid UTF-8. The decoder does not fall back to Latin-1 or guess an encoding. Check the grouping and the source of the bits.

Is binary code encrypted?

No. Binary is just base-2 notation for the same bytes, and anyone can convert it back. It provides no confidentiality. Use the Encryption Generator if you need a secret, and remember that even encryption is only as strong as the passphrase and the device.

All tools →