Text to Binary & Hex Converter

Encode text into binary, hexadecimal or ASCII codes — and decode them straight back to text — instantly, live as you type, with one-click copy.

How to Convert Text to Binary or Hex

Three steps, all in your browser.

1

Pick a direction

Choose Text to Binary, Text to Hex or Text to ASCII to encode, or Binary to Text, Hex to Text or ASCII to Text to decode. The Swap button flips the current direction and moves the result into the input in one click.

2

Type or paste

Enter your text or codes. Encoding turns each character into its 8-bit ASCII value; decoding is tolerant of spaces and line breaks between groups. Converting numbers between bases instead? Use the Number Base Converter.

3

Read and copy

The output updates live as you type. Toggle the space-between-bytes option to suit your format, then hit Copy — nothing is uploaded, every conversion happens on your own device.

Frequently Asked Questions

How do I convert text to binary?
Pick the Text to Binary mode and type or paste your text. Each character is turned into its ASCII code and written as an 8-bit binary number, so the letters appear as groups of eight 0s and 1s separated by spaces. For example the word Hi becomes 01001000 01101001. Everything updates live as you type and nothing is uploaded — the conversion runs entirely on your own device.
How do I read binary back into text?
Switch to Binary to Text mode and paste your bits. Group the binary into blocks of eight digits — each 8-bit group is one character — and the tool converts every group back to its letter. Spaces and line breaks between the groups are ignored, and if you paste one long run of bits with no spaces it is still split into 8-bit chunks automatically before decoding.
What is the binary code for the letter A?
The capital letter A has the ASCII code 65, which is 01000001 in 8-bit binary. Lowercase a is 97, or 01100001. You can confirm this by typing A in Text to Binary mode, or by pasting 01000001 into Binary to Text mode to get the letter back. In hexadecimal the same code 65 is written as 41.
What is the difference between text to binary and text to hex?
Both encode the same ASCII code for each character — they only differ in how that code is written. Binary shows the code in base 2 as eight 0s and 1s per character, while hexadecimal shows it in base 16 as two compact digits from 0–9 and A–F. The letter A is 01000001 in binary and 41 in hex. Hex is shorter and is common in color codes, byte dumps and memory addresses, while binary makes the individual bits visible.
Does this handle ASCII or Unicode?
The converter reads each character with its JavaScript character code, so all standard ASCII text — letters, digits, punctuation and spaces, codes 0 to 127 — encodes and decodes cleanly. Characters above 127, such as accented letters or emoji, use code points beyond a single byte, so their binary and hex output can be longer than 8 bits or two digits and are best treated as advanced use. For everyday ASCII text the results are exact.