Developer tools

Text to Binary

Text to Binary Converter

Convert text to binary (8-bit UTF-8 bytes) and binary back to text.

About this tool

About Text to Binary

Write any message in ones and zeros, or read a string of binary back as text. Each character is turned into UTF-8 bytes and each byte is written as eight bits, so the letter A becomes 01000001 and a space becomes 00100000. Because it uses UTF-8 rather than plain ASCII, accented letters, non-Latin scripts and emoji convert correctly too, taking two to four bytes each. Choose spaces, commas or new lines between bytes, or none at all for a continuous bit stream, and add a 0b prefix if you are pasting into code. Switch to Code points to see each character's Unicode number in binary instead of its bytes. To decode, paste binary with or without spaces: an unbroken run is split into 8-bit groups, and a missing or extra bit is reported instead of producing garbage. It is useful for computer science homework, puzzles, teaching how text is stored and checking bit patterns, all in your browser.

Built and maintained by Abhi JainUpdated

How to Convert Text to Binary

  1. 1

    Choose the direction

    Pick Text → Binary, or Binary → Text to translate binary back.

  2. 2

    Adjust the format

    Choose UTF-8 bytes or Code points, a Separator, Pad to 8 bits and the 0b prefix.

  3. 3

    Type and copy

    Type your message, then copy or download the binary. Click Swap to decode it again.

Text to Binary: questions and answers

How do you write letters in binary?

Each letter has a number (A is 65, a is 97) and that number is written in base 2. 65 is 1000001, padded to eight bits as 01000001. The tool does this for every character.

Why is each letter 8 bits?

Computers store text in bytes of 8 bits. Plain ASCII needs only 7, but text is stored as whole bytes, so a leading 0 is added. Characters outside ASCII use two to four bytes in UTF-8.

What is 'hello' in binary?

01101000 01100101 01101100 01101100 01101111.

Can I decode binary without spaces?

Yes, as long as the length is a multiple of 8. The tool splits the bits into bytes and tells you if a bit is missing or extra.

Ready-made Text to Binary presets