DEVELOPER TOOL

Binary Translator: Binary to Text, Text to Binary & Hex

Translate text to binary or hex, or decode binary to text and hex to text, with or without spaces between the bytes. Nothing is sent to a server. To convert a number such as 42 rather than text, use the Binary to Decimal Converter.

About this tool

This binary translator converts in four directions: text to binary, binary to text, text to hex and hex to text. It works on bytes, not on letters. Your text is first encoded as UTF-8, the encoding used by almost every web page, and each byte is then written as 8 binary digits or 2 hex digits. Decoding reverses the process: the digits are turned back into bytes and the bytes are read as UTF-8.

How to use the binary translator

  1. Pick a direction: Text → Binary, Text → Hex, Binary → Text or Hex → Text.
  2. Type or paste your input. The result updates as you type, with a count of characters and bytes underneath.
  3. Copy the result with the button. If decoding finds a problem, a note under the result says what went wrong.

How text becomes bytes: ASCII and UTF-8

Computers store text as numbers. ASCII defines 128 codes, 0 to 127, for English letters, digits, punctuation and control characters. It is a 7-bit code, normally stored in an 8-bit byte whose top bit is 0, which is why H (72) appears as 01001000. ASCII has no room for é, € or emoji, so the tool uses UTF-8 (RFC 3629), which keeps the ASCII codes unchanged and stores every other Unicode character in 2 to 4 bytes:

The first byte announces the length. A byte starting with 0 stands alone, 110 starts a 2-byte sequence, 1110 a 3-byte one and 11110 a 4-byte one, and every continuation byte starts with 10. These byte values were checked with Python's UTF-8 encoder and match what the tool produces:

CharacterNameCode pointUTF-8 bytes (hex)Bytes
ACapital AU+0041411
ée with acute accentU+00E9C3 A92
ñn with tildeU+00F1C3 B12
€Euro signU+20ACE2 82 AC3
😀Grinning face emojiU+1F600F0 9F 98 804
👍🏽Thumbs up, medium skin toneU+1F44D + U+1F3FDF0 9F 91 8D F0 9F 8F BD8

The thumbs-up with a skin tone is two code points, the emoji and a skin-tone modifier, so it takes 8 bytes even though it looks like one symbol.

How the decoder reads binary

Spaces, line breaks and commas all separate bytes. Each group of 1 to 8 digits is read as one byte, so 7-bit ASCII written as 1001000 1101001 decodes to Hi just as 01001000 01101001 does. An optional 0b prefix on a group is ignored.

Binary without spaces is split by length. A run whose length is a multiple of 8 is cut into 8-bit bytes, so 0100100001101001 becomes Hi. Otherwise, a run whose length is a multiple of 7 is cut into 7-bit ASCII codes, so 10010001101001 is also Hi. A run that fits neither rule is rejected instead of guessed. A run of 56, 112 or any other multiple of both 7 and 8 is always read as 8-bit bytes.

How hex fits in

One hex digit stands for exactly four binary digits, so a byte is always two hex digits: 4 is 0100 and 8 is 1000, giving 48 = 01001000 = 4 × 16 + 8 = 72. Hex to text accepts spaced pairs (48 69), 0x prefixes (0x48 0x69) or one unbroken run (4869), and a run with an odd number of digits is rejected. To convert a number such as 255 rather than text, use the Hex to Decimal Converter or the Binary to Decimal Converter, and the guide to converting binary to decimal by hand explains place values step by step.

Worked example

The translator opens with Hello in Text → Binary mode. Each letter is in the ASCII range, so each becomes one byte: H is 72, e is 101, l is 108 and o is 111. The tool shows:

01001000 01100101 01101100 01101100 01101111
5 characters (code points), 5 bytes in UTF-8.

Switch to Text → Hex and the same five bytes read 48 65 6C 6C 6F. Now type café instead: the é needs two bytes, so the output is 01100011 01100001 01100110 11000011 10101001, which is 4 characters but 5 bytes.

Binary alphabet chart (A to Z)

Uppercase and lowercase English letters in UTF-8, which matches ASCII for these characters. Lowercase is always 32 (hex 20) higher, so the two forms differ only in the third bit from the left. A space is 00100000 (hex 20).

LetterHex (upper)Binary (upper)Hex (lower)Binary (lower)
A41010000016101100001
B42010000106201100010
C43010000116301100011
D44010001006401100100
E45010001016501100101
F46010001106601100110
G47010001116701100111
H48010010006801101000
I49010010016901101001
J4A010010106A01101010
K4B010010116B01101011
L4C010011006C01101100
M4D010011016D01101101
N4E010011106E01101110
O4F010011116F01101111
P50010100007001110000
Q51010100017101110001
R52010100107201110010
S53010100117301110011
T54010101007401110100
U55010101017501110101
V56010101107601110110
W57010101117701110111
X58010110007801111000
Y59010110017901111001
Z5A010110107A01111010

Edge cases and common mistakes

Frequently asked questions

Why is each letter's binary code 8 digits long?

Text is encoded as UTF-8 bytes, and each byte is shown as 8 binary digits. Basic ASCII characters (English letters, digits, and common punctuation) take one byte, so they convert to exactly 8 binary digits; accented letters, other scripts, and emoji take 2 to 4 bytes, so they convert to 16 to 32 binary digits.

What's the difference between binary and hex here?

Both represent the same underlying byte values for your text — binary shows each byte as 8 digits of 0s and 1s, while hex shows the same byte as 2 hexadecimal digits (0-9, A-F), which is more compact and easier to read.

Can I paste binary without spaces?

Yes. A run of digits with no spaces is split into 8-bit bytes when its length is a multiple of 8, or into 7-bit ASCII codes when its length is a multiple of 7 but not 8. For example, 0100100001101001 decodes to Hi. A run whose length fits neither rule is rejected, because there is no safe place to split it.

How do I convert hex to text?

Choose Hex → Text and paste the hex. Byte pairs can be separated by spaces, written with 0x prefixes or run together, so 48 65 6C 6C 6F, 0x48 0x65 0x6C 0x6C 0x6F and 48656C6C6F all decode to Hello. The bytes are read as UTF-8, so C3 A9 becomes é.

What is Hello in binary?

Hello in binary is 01001000 01100101 01101100 01101100 01101111. Each group is one byte for one letter: H is 72, e is 101, l is 108 and o is 111 in decimal. In hex the same word is 48 65 6C 6C 6F, which is shorter to write but represents exactly the same five bytes.

Why does a question mark in a diamond appear when I decode binary or hex?

That symbol is the Unicode replacement character. The browser inserts it when the bytes do not form valid UTF-8, for example when a multi-byte character is missing one of its bytes or the data came from a different encoding such as Windows-1252. Check that no group was dropped or mistyped, then decode again.

Why is the binary for an emoji so long?

Most emoji have code points above U+FFFF, and UTF-8 stores those in 4 bytes. That means 32 binary digits or 8 hex digits for a single emoji. The grinning face, U+1F600, becomes F0 9F 98 80 in hex, while a plain English letter needs only one byte.