Binary Code Translator
Convert text to binary and binary back to text using UTF-8 bytes, UTF-16 code units, UTF-32 code points, or ASCII.
Binary Code Translator
UTF-8 is recommended for most text. It represents Unicode text as 1โ4 bytes per code point and supports accented characters, non-Latin scripts, and emoji.
Binary values are displayed as groups separated by spaces.
How the Binary Code Translator Works
Computers store and process digital data using binary values: zeros and ones. This tool converts text into the binary representation of the selected encoding or representation, and can convert compatible binary data back into text.
UTF-8 is recommended for most text because it supports the full Unicode character set while using only one byte for standard ASCII characters. UTF-8 uses between one and four bytes for each Unicode code point.
H โ 01001000
e โ 01100101
l โ 01101100
l โ 01101100
o โ 01101111
Encoding Differences
- UTF-8 โ A variable-width Unicode encoding that represents each code point using 1โ4 bytes. It is the most common encoding for websites, APIs, and text files.
- UTF-16 โ Represents text using 16-bit code units. Characters in the Basic Multilingual Plane normally use one code unit, while characters outside it use a surrogate pair consisting of two code units. This tool displays those code units directly as binary values.
- UTF-32 โ Represents each Unicode code point using a 32-bit value. It is straightforward to interpret but generally requires more storage than UTF-8 or UTF-16. This tool displays the code point as a 32-bit binary value.
- ASCII โ A 7-bit character encoding containing 128 characters. This tool displays each ASCII value using 8 bits for convenient byte-style representation.
A Note About UTF-16 and UTF-32
This tool displays UTF-16 code units and UTF-32 Unicode code points directly as binary values. It does not attempt to produce a specific byte order such as UTF-16LE, UTF-16BE, UTF-32LE, or UTF-32BE, and it does not add a byte-order mark (BOM).
This distinction matters when working with raw binary files or network protocols, where byte order can be significant.
Frequently Asked Questions
What is binary code?
Binary represents data using two symbols: 0 and 1. Digital computers use binary because electronic circuits can reliably represent two distinct states.
How do I convert text to binary?
Type or paste your text into the input area, choose an encoding, and the binary representation is generated automatically. UTF-8 is recommended for most text.
Can I convert binary back to text?
Yes. Switch to Binary to Text mode, choose the appropriate representation, and paste binary values separated by spaces or other whitespace. Each value must contain the correct number of bits for the selected format.
What is the difference between UTF-8 and ASCII?
ASCII defines 128 characters and is limited to a relatively small set of English letters, numbers, control characters, and symbols. UTF-8 includes all ASCII characters while also supporting the full Unicode character set, including languages around the world, symbols, and emoji.
Does UTF-8 support emoji?
Yes. UTF-8 supports the Unicode character set, including emoji and characters from many writing systems. Individual Unicode code points use between one and four UTF-8 bytes.
What does UTF-16 Code Units mean?
UTF-16 represents text using 16-bit code units. Most Unicode characters use one code unit, while characters outside the Basic Multilingual Plane use two 16-bit code units called a surrogate pair. This tool displays those code units directly as binary values rather than producing a byte-order-specific UTF-16 stream.
What does UTF-32 Code Points mean?
UTF-32 represents each Unicode code point using a 32-bit value. Unlike UTF-8 and UTF-16, every valid Unicode code point occupies exactly one 32-bit value in this representation. This tool displays that value directly as binary.
What binary input format does the tool accept?
Binary-to-text mode accepts binary values separated by spaces, tabs, or line breaks. UTF-8 and ASCII values must contain exactly 8 bits, UTF-16 values must contain exactly 16 bits, and UTF-32 values must contain exactly 32 bits.