Text to Binary Converter
Use this Unicode-aware text-to-binary converter to encode text as real UTF-8 bytes. Copy grouped 8-bit binary or hexadecimal output, compare character, byte, bit, and line counts, and inspect the UTF-8 bytes generated by each Unicode code point.
UTF-8 binary
01001000 01100101 01101100 01101100 01101111
- Code points
- 5
- UTF-8 bytes
- 5
- Bits
- 40
- Lines
- 1
Hexadecimal bytes
The same UTF-8 bytes written in base 16.
48 65 6C 6C 6FCharacter and byte inspector
See how each Unicode scalar value is encoded.
Character and byte inspector
See how each Unicode scalar value is encoded.
| # | Character | Code point | UTF-8 hex | UTF-8 binary |
|---|---|---|---|---|
| 1 | H | U+0048 | 48 | 01001000 |
| 2 | e | U+0065 | 65 | 01100101 |
| 3 | l | U+006C | 6C | 01101100 |
| 4 | l | U+006C | 6C | 01101100 |
| 5 | o | U+006F | 6F | 01101111 |
How to Convert Text to Binary
Type or paste text into the input panel. Conversion happens immediately, so there is no Convert button and no file upload step.
The UTF-8 binary panel shows one eight-digit group for every encoded byte. Use its copy control to copy the complete binary sequence, including spaces between byte groups.
The hexadecimal section shows the same bytes in base 16. Open the character and byte inspector when you need to see which Unicode code point produced each sequence.
This Converter Uses UTF-8, Not an ASCII-Only Shortcut
ASCII covers 128 values and assigns one byte to familiar English letters, digits, punctuation, spaces, and control characters. UTF-8 preserves those same byte values, so ASCII text produces the expected one-byte binary codes.
The difference appears when text contains characters outside ASCII. Accented letters, Greek, Arabic, Devanagari, Chinese characters, symbols, and emoji are encoded as valid multi-byte UTF-8 sequences rather than being removed, replaced with an arbitrary question mark, or forced into an eight-bit ASCII table.
This is why the tool can serve common ASCII-to-binary searches while still producing correct Unicode output for modern text.
How UTF-8 Turns Unicode Code Points Into Bytes
Unicode assigns an abstract code point to each encoded character. UTF-8 serialises each valid Unicode scalar value as a sequence of one, two, three, or four bytes.
Code points in the ASCII range use one byte. Higher code points use additional bytes, with leading-bit patterns that identify the first byte and continuation bytes.
The converter passes the string to TextEncoder and displays the resulting Uint8Array directly, so the output reflects the browser's UTF-8 encoding rather than a hand-maintained lookup table.
Surrogate code points are not Unicode scalar values and cannot be encoded directly in well-formed UTF-8. If the JavaScript string contains an unpaired UTF-16 surrogate, TextEncoder replaces it with U+FFFD and the interface reports that replacement.
UTF-8 byte length by Unicode code-point range
Swipe horizontally to view the full table.
Understanding Binary, Hexadecimal, Character, Byte, and Bit Counts
Binary and hexadecimal are two representations of the same byte sequence. A byte such as hexadecimal 48 is binary 01001000; changing the number base does not change the encoded data.
The UTF-8 byte count measures encoded storage length. The bit count is always eight times that byte count because every displayed group represents one byte.
The interface's Code points metric counts Unicode scalar values after TextEncoder's lone-surrogate replacement step. It can differ from both byte count and the number of visible symbols a person perceives on screen.
What each result means
Swipe horizontally to view the full table.
Using the Character and Byte Inspector
Open the inspector to map each input code point to its Unicode notation, hexadecimal UTF-8 bytes, and binary UTF-8 bytes.
This is useful when a word contains a mix of one-byte ASCII characters and multi-byte Unicode characters, or when two pieces of text look similar but produce different bytes.
For performance, the table shows at most 200 code points. The main binary and hexadecimal outputs still include every byte from the accepted input.
Character inspector reference
Swipe horizontally to view the full table.
Characters, Code Points, Code Units, and Grapheme Clusters
These terms describe different layers of text. A Unicode code point is an assigned numeric value such as U+0041 for A. JavaScript strings are internally organised as UTF-16 code units. UTF-8 is the byte encoding produced by this converter.
A user-perceived character, formally called an extended grapheme cluster, can contain more than one code point. For example, a letter followed by a combining accent can display as one symbol while the inspector shows two rows.
Some emoji sequences also join several code points with variation selectors or zero-width joiners. The tool intentionally exposes the underlying code points and bytes instead of pretending every visible symbol is one encoded value.
Spaces, Tabs, Line Breaks, and Other Invisible Bytes
Whitespace is encoded data. A space produces byte 20 in hexadecimal, a horizontal tab produces 09, and a line feed produces 0A.
The input panel preserves line breaks. The Lines metric recognises LF, CRLF, and CR separators, while the inspector gives common invisible characters readable labels.
Invisible differences matter when debugging source files, copied text, protocols, command output, and data that fails an exact byte comparison.
Common whitespace and control-byte examples
Swipe horizontally to view the full table.
Why Similar-Looking Text Can Produce Different Binary
Unicode can represent visually similar text with different code-point sequences. The precomposed character é uses U+00E9 and encodes as C3 A9 in UTF-8.
The decomposed sequence e followed by combining acute accent uses U+0065 U+0301 and encodes as 65 CC 81. The two versions can look alike while differing in code-point count, byte count, hexadecimal output, and binary output.
The converter does not normalise text before encoding. It preserves the sequence represented by the JavaScript input so users can observe those differences.
Practical Uses for a Text-to-Binary Converter
Students can compare letters, numbers, spaces, accented text, scripts, and emoji to understand variable-width character encoding.
Developers can verify UTF-8 examples, inspect copied text, compare a known hex dump, prepare test fixtures, or explain why a database, file, API, or protocol reports a specific byte length.
The tool is an encoder and teaching aid. It is not encryption, compression, hashing, a binary file viewer, or a way to hide sensitive information.
Choosing the useful output
Swipe horizontally to view the full table.
Input Limits, Copying, and Large Outputs
The text field accepts up to 10,000 UTF-16 code units. This browser-level length can differ from the displayed code-point count because supplementary Unicode code points use two UTF-16 code units.
A 10,000-unit input can produce substantially more than 10,000 UTF-8 bytes when it contains multi-byte characters. Binary output is therefore placed in a scrollable region rather than expanding without limit.
Binary and hexadecimal have separate copy controls. Copying writes only the selected output to the clipboard and does not submit the input to a server.
Privacy and Local Processing
Encoding uses TextEncoder inside the browser. The tool does not send text to an API, create an account record, upload a file, or place the input into a shareable URL.
The page calculates output from the current input state. Clearing the field removes the visible input and derived results from the component.
Browser extensions, clipboard managers, device policies, and the browser itself are outside the tool's control, so avoid processing secrets on devices or browsers you do not trust.
UTF-8 Binary Conversion Formulas
TextEncoder first produces a sequence of UTF-8 bytes. Each byte is then padded to eight binary digits or two hexadecimal digits for display.
Formula variables
- An integer from 0 through 255 in the UTF-8 byte array
- The ordered bytes returned by UTF-8 encoding
- The number of bytes in the encoded Uint8Array
- The total number of displayed binary digits before separators
Examples
ASCII letter
1Input
A
Show result
Result
Binary: 01000001; hexadecimal: 41; 1 Unicode code point; 1 UTF-8 byte; 8 bits.
UTF-8 preserves the ASCII byte value for A.
English word
2Input
Hello
Show result
Result
01001000 01100101 01101100 01101100 01101111
The five ASCII letters produce five bytes and 40 bits.
Accented Latin character
3Input
é
Show result
Result
Binary: 11000011 10101001; hexadecimal: C3 A9; 1 code point; 2 UTF-8 bytes.
U+00E9 is outside ASCII and requires two UTF-8 bytes.
Chinese character
4Input
你
Show result
Result
Binary: 11100100 10111101 10100000; hexadecimal: E4 BD A0; 1 code point; 3 UTF-8 bytes.
Emoji
5Input
🙂
Show result
Result
Binary: 11110000 10011111 10011001 10000010; hexadecimal: F0 9F 99 82; 1 code point; 4 UTF-8 bytes.
Many emoji are supplementary-plane code points encoded with four UTF-8 bytes.
Precomposed and decomposed text
6Input
Compare é with e followed by U+0301.
Show result
Result
Precomposed é: C3 A9. Decomposed e + combining acute: 65 CC 81.
The strings can look alike but contain different code points and bytes.
Text containing a space
7Input
A B
Show result
Result
01000001 00100000 01000010
The middle group is the UTF-8 and ASCII space byte.
Frequently Asked Questions
How does the text-to-binary converter work?
It encodes the JavaScript string with the browser's UTF-8 TextEncoder, then formats every resulting byte as an eight-digit binary group.
Is this an ASCII-to-binary converter?
It supports ASCII text, and ASCII characters retain their familiar one-byte values in UTF-8. Unlike an ASCII-only converter, it also correctly encodes the rest of Unicode.
Why are binary digits grouped in sets of eight?
Each group represents one byte. UTF-8 is a byte-oriented encoding, so a code point that needs several bytes produces several eight-bit groups.
Why does one character sometimes produce multiple binary groups?
UTF-8 is variable-width. ASCII-range code points use one byte, while other code points require two, three, or four bytes.
Can the converter encode emoji?
Yes. TextEncoder supports Unicode text, and many emoji encode as four UTF-8 bytes. Joined emoji sequences can contain several code points and therefore many bytes.
Can it convert Chinese, Japanese, Arabic, Hindi, or other scripts?
Yes. The converter uses UTF-8 and can encode Unicode text from supported scripts rather than limiting input to English ASCII.
What is the hexadecimal output?
It is the same UTF-8 byte sequence written in base 16. Each byte appears as two uppercase hexadecimal digits.
Why is the character count different from the byte count?
The Code points metric counts Unicode scalar values after any lone-surrogate replacement, while the byte metric counts the UTF-8 storage required for those values. Non-ASCII code points often use multiple bytes.
Does the character count equal the number of visible symbols?
Not always. A visible grapheme can contain multiple code points, such as a letter plus a combining mark or an emoji joined from several components.
Why do two identical-looking words produce different binary?
Unicode sometimes allows precomposed and decomposed sequences that render similarly. The converter preserves the entered sequence and exposes its actual code points and bytes.
Are spaces converted to binary?
Yes. A regular space is hexadecimal 20 and binary 00100000 in UTF-8 and ASCII.
Are tabs and line breaks included?
Yes. Tabs, carriage returns, and line feeds are encoded as bytes and appear in the complete output. The inspector labels common invisible characters.
What does the Lines metric count?
It counts text lines separated by LF, CRLF, or CR line endings. Empty input reports zero lines.
What does the character and byte inspector show?
It maps each displayed Unicode code point to its U+ notation, hexadecimal UTF-8 bytes, and binary UTF-8 bytes.
Why does the inspector stop after 200 rows?
The row limit keeps large inputs responsive. Binary, hexadecimal, byte, bit, and code-point results still use the complete accepted input.
What is the maximum input length?
The text field accepts up to 10,000 JavaScript string units. Some supplementary Unicode code points occupy two UTF-16 string units, so this limit is not always the same as 10,000 displayed code points.
What happens to an unpaired UTF-16 surrogate?
TextEncoder replaces a lone high or low surrogate with U+FFFD before producing UTF-8. The converter reports the replacement instead of presenting the surrogate as a valid UTF-8 code point.
Does the converter add a UTF-8 byte-order mark?
No. TextEncoder returns the UTF-8 bytes for the entered string and does not prepend a BOM.
Can I choose UTF-16, UTF-32, or a legacy encoding?
No. The tool intentionally uses UTF-8 only so the output and inspector remain consistent and unambiguous.
Is binary conversion encryption?
No. Binary and hexadecimal are readable representations of encoded bytes. Anyone can convert them back when the encoding is known.
Can I copy the result?
Yes. Binary and hexadecimal outputs have separate copy controls. Clipboard access depends on browser support and permission.
Is my text uploaded or stored?
No. Encoding and inspection run locally in the browser, and the tool does not place the input into a public URL or send it to an encoding service.
References
You might also like
Morse Code Translator
Translate text to International Morse code or decode written dots and dashes, then copy or play the result without an account.
Braille Translator
Convert supported English text to uncontracted Unicode Braille or decode the documented Braille subset back to English, then copy the result and inspect its dot patterns.
ASCII Art Generator
Convert images or a live camera feed into copyable ASCII art with adjustable detail, character styles, color, PNG and TXT exports.
Minecraft Nether Portal Calculator
Convert Minecraft coordinates between the Overworld and Nether with exact positions, whole-block targets, and correct negative-coordinate rounding.