Text to Binary Converter

Text to binary, hex, octal and decimal bytes and back

Type in either box. Text is encoded as UTF-8.

How to convert text to binary

  1. Type or paste text in the Text box. Each character is converted to its UTF-8 bytes and shown as 8-bit binary, for example H becomes 01001000.
  2. Switch the format to hexadecimal, octal or decimal byte values, and choose a separator or a 0x/0b prefix.
  3. To decode, type or paste binary, hex, octal or decimal values in the other box. Spaces, commas and new lines are all accepted, and unbroken strings like 0100100001101001 are split into bytes automatically.

How text becomes bits

Computers store text as numbers. The ASCII standard assigns 0–127 to English letters, digits and punctuation: A is 65 (01000001), a is 97 and a space is 32. UTF-8, the encoding used by almost all of the web, keeps those values and uses two to four bytes for everything else, so é is 11000011 10101001 and an emoji takes four bytes. That is why the byte count can be larger than the character count.

Hexadecimal is a compact way to write the same bytes, two hex digits per byte, and is what you see in hex editors, network captures, colour codes and escape sequences such as \x48. Octal is mostly seen in older Unix tools, and decimal byte lists in languages such as C and Python.

This converter is useful for computer science homework, puzzles and escape rooms, debugging encoding problems (mojibake such as é) and preparing test data. It runs entirely in your browser.

What is "hello" in binary?

01101000 01100101 01101100 01101100 01101111, one byte per letter.

Why does one character produce several bytes?

Characters outside basic ASCII, such as accented letters, Chinese characters and emoji, need two to four bytes in UTF-8.

Can I convert binary numbers, not text?

This tool converts text bytes. To convert a single number between binary, decimal and hex, use a number base converter in the Maths category.

Made by BufferMint. We also design and build software products for founders. See our services →

Your files and inputs never leave your device; we only count anonymous visits.