Text to Binary Converter
Convert text to binary, hex, or base64, and decode back to text.
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the Text to Binary Converter
Select Encode or Decode, choose your encoding format, then type or paste text into the input box. Output appears instantly.
- Encode: Enter plain text and select Binary, Hex, or Base64 to see the encoded form.
- Decode: Enter encoded data and the tool converts it back to plain text. For binary, separate each byte with a space. For hex, separate bytes with spaces. For base64, paste the raw base64 string.
- Binary format: Each character is represented as 8 bits (one byte). "A" becomes "01000001". Bytes are separated by spaces.
- Hex format: Each character is two hexadecimal digits. "A" becomes "41". Bytes are space-separated.
- Base64 format: Groups of 3 bytes are encoded as 4 characters from a 64-character alphabet. Used extensively in email attachments, data URLs, and API payloads.
About Text Encoding
Text encoding converts human-readable characters into a numerical representation that computers can store and transmit. ASCII assigns numbers 0 to 127 to English letters, digits, and common symbols. Binary shows those numbers in base 2. Hex shows them in base 16. Base64 uses a 64-character alphabet (A-Z, a-z, 0-9, +, /) to represent arbitrary bytes using only printable ASCII characters, which is why it is widely used for embedding binary data in text-based formats like JSON, XML, and email.
Frequently Asked Questions
What is binary text encoding?
Binary encoding represents each text character as a sequence of 8 bits (0s and 1s). Every character in the ASCII range has a specific 8-bit binary value. The letter "A" is 65 in decimal, which is 01000001 in binary. The letter "a" is 97, which is 01100001. This tool encodes text character by character and shows each 8-bit group separated by a space.
What is Base64 used for?
Base64 is used when binary data needs to be transmitted over text-based protocols. Common uses include embedding images in HTML or CSS as data URLs, attaching files to emails (MIME encoding), passing data in JSON API responses, storing binary data in XML, and encoding credentials in HTTP Basic Authentication headers. Base64 increases data size by about 33% compared to raw binary.
What is the difference between hex and binary?
Both represent the same numerical values, just in different bases. Binary uses base 2 (only 0 and 1). Hexadecimal uses base 16 (0-9 and A-F). One hex digit represents exactly 4 binary digits (bits), so hex is more compact. Programmers often prefer hex because it is shorter to write and easier to read than long strings of 0s and 1s. The letter "A" is 01000001 in binary and 41 in hex.
Does this handle Unicode and emoji?
Base64 handles Unicode and emoji correctly by first encoding text as UTF-8, then converting to Base64. Binary and hex encoding in this tool work with the character code values directly. Characters outside the basic Latin range (code points above 127) may produce multi-byte values that look different from simple ASCII encoding. For full Unicode support across all encodings, Base64 is the most reliable option.