# Text to Binary Converter

> Turn text into binary, hex, decimal or octal bytes and decode them back to text, with UTF-8 for any language and emoji and a table that shows every character's bytes.

- Page: https://codethatmoves.com/tools/text/text-to-binary/
- Site: Code That Moves
- Category: Text tools
- Free, runs in the browser, nothing is uploaded
- Last checked: 2026-11-03

## What it does

- Text to binary, hex, decimal or octal and back to text
- UTF-8 encoding, so accented letters, other scripts and emoji convert correctly, plus UTF-16 (big-endian) and 7-bit ASCII for coursework and puzzles
- Detects the number system of pasted bytes and offers to switch; a 0x or \x prefix always means hex
- Every output decodes back, including decimal and octal written without separators
- A share link keeps the text, the number system and the encoding
- Reads bytes with or without spaces, with commas or new lines, and with 0b, 0x or \x prefixes
- Character by character table with the code point and the bytes in each system
- Clear errors that name the group that is not a valid byte

## How to use it

1. Pick Binary, Hex, Decimal or Octal, then type text in the box. The bytes appear on the right, separated the way you choose.
2. To decode, switch to the to text direction and paste the bytes. The tool guesses the number system and splits binary without spaces into groups of eight.
3. Copy the result or the share link. Open the character table to see why an emoji or an accented letter takes more than one byte.
4. For a class that asks for ASCII, pick ASCII (7-bit): each character becomes seven binary digits, and characters outside ASCII are named in an error.

## What it checks and why

Computers store text as numbers. The tool first turns the text into UTF-8 bytes, the encoding used by nearly every web page, and then writes each byte in the number system you picked: eight binary digits, two hex digits, a decimal number from 0 to 255, or three octal digits.

Plain English letters, digits and punctuation take one byte each in UTF-8, the same values as ASCII: capital A is 01000001, or 65. Letters with accents take two bytes, most other scripts two or three, and emoji four. That is why Hi gives two groups of binary but a single emoji gives four.

Decoding works the other way. The groups are read as bytes and the bytes are decoded as UTF-8. If they are not valid UTF-8, for example because a byte is missing from the middle of an emoji, the tool says so and shows a replacement character where the text breaks.

UTF-8 is defined in RFC 3629 and in the Unicode Standard. Browsers expose it through TextEncoder and TextDecoder, which the tool uses, so the result matches what a browser sends over the network.

## Specs and sources

- [RFC 3629: UTF-8, a transformation format of ISO 10646](https://www.rfc-editor.org/rfc/rfc3629)
- [MDN: TextEncoder](https://developer.mozilla.org/en-US/docs/Web/API/TextEncoder)
- [Unicode Standard, chapter 3: encoding forms](https://www.unicode.org/versions/latest/core-spec/chapter-3/)

## Limits

- UTF-8, UTF-16 (big-endian) and 7-bit ASCII are supported. Text from old files in Windows-1252 or other code pages will decode to different characters.
- Each group must be one byte (0 to 255, or 0 to 127 in ASCII). Larger numbers, such as a whole code point written in binary, are rejected rather than guessed.
- Without separators, binary needs a multiple of 8 digits (7 in ASCII), hex an even number, and octal and decimal a multiple of 3. Decimal without a separator is padded to three digits per byte so it can be read back.
- The character table shows the first 60 characters and says so when the text is longer.

## Questions

### How do you write hello in binary?

In UTF-8 or ASCII, hello is 01101000 01100101 01101100 01101100 01101111: one byte for each of the letters h, e, l, l and o.

### How do I convert binary to text?

Switch to binary to text and paste the digits. Groups of eight bits are read as bytes and the bytes are decoded as UTF-8 text.

### Why does an emoji take 32 bits?

UTF-8 stores characters outside the first 65,536 code points, such as most emoji, in four bytes. Four bytes of eight bits each make 32 binary digits.

### What is the difference between ASCII and UTF-8 binary?

For the 128 ASCII characters the values are the same: UTF-8 uses the same single bytes, written as eight binary digits. ASCII is a 7-bit code, so some courses write it with seven digits, which the ASCII (7-bit) option does. UTF-8 also covers every other character with two to four bytes, which ASCII cannot.

### Can I convert text to hex with this tool?

Yes. Pick Hex and every byte is written as two hex digits, uppercase or lowercase, with the separator you choose, or none for a continuous hex string.
