Text to Binary Converter
Convert text to binary code instantly. Free text to binary converter for programming.
| Char | Binary | Hex | Decimal |
|---|---|---|---|
| H | 01001000 | 48 | 72 |
| e | 01100101 | 65 | 101 |
| l | 01101100 | 6C | 108 |
| l | 01101100 | 6C | 108 |
| o | 01101111 | 6F | 111 |
How Text to Binary Works
Each character in your input gets converted to its numeric code point and then expressed as a binary, hexadecimal or octal string. ASCII characters use 7 bits but the tool pads to 8 bits per byte for readability, so 'A' (decimal 65) becomes 01000001 in binary, 41 in hex, 101 in octal. Pick a format from the pills at the top, toggle 'Spaces between bytes' on or off, and the output regenerates instantly.
For inputs of 20 characters or fewer, a reference table appears below showing each character alongside its binary, hex and decimal values. This is the easy way to check that a particular byte is what you expected. The conversion runs entirely in your browser using JavaScript's charCodeAt(), so even confidential snippets stay local. Pasted text up to a few hundred kilobytes converts without delay.
ASCII vs UTF-8 - The Multibyte Catch
Plain English text is 7-bit ASCII, so 'Hello' produces five clean 8-bit bytes. The moment you include an em dash, an accented vowel, an emoji or any non-Latin character, you are in UTF-8 territory and a single visible character can occupy 2, 3 or 4 bytes. The tool uses charCodeAt() which returns UTF-16 code units, so the Β£ symbol comes out as a single 16-bit value (00000000 10100011), and emoji like the rocket consist of a surrogate pair where each half has its own binary representation.
If you need true UTF-8 byte-by-byte output (for example, to verify what an HTTP server sees), encode your string with TextEncoder first in a developer console, or paste only ASCII characters. For the typical use cases (homework, learning binary, encoding short messages for fun), the default behaviour is exactly what you want. ASCII codes 0-127 are identical across all encodings, so 'Hello World' is unambiguous.
Common Character Codes
| Char | Decimal | Binary (8-bit) | Hex |
|---|---|---|---|
| A | 65 | 01000001 | 41 |
| a | 97 | 01100001 | 61 |
| 0 | 48 | 00110000 | 30 |
| space | 32 | 00100000 | 20 |
| ! | 33 | 00100001 | 21 |
| newline | 10 | 00001010 | 0A |
Frequently Asked Questions
Why is each byte 8 bits when ASCII only needs 7?
Standard ASCII fits in 7 bits (128 characters from 0 to 127), but computers store data in 8-bit bytes. The leading zero is padding for alignment. Extended ASCII and ISO-8859-1 use the eighth bit for additional 128 characters. UTF-8 uses the leading bits as a multibyte marker, which is why the eighth bit being a 1 in your output usually signals you have a non-ASCII character.
Can I convert binary back to text?
Not in this tool, which is one-way text-to-binary. For the reverse direction (binary digits back to readable text), use the [String to Binary](/string-to-binary) tool which handles both directions, or paste your binary into [Text to Morse Code](/text-to-morse-code) for a different code system entirely.
What does 'spaces between bytes' actually do?
With the toggle on, you get '01001000 01100101 01101100' (one space per character boundary). With it off, you get '010010000110010101101100' (one solid run of bits). Spaces are useful for human reading and for pasting into a binary-to-text converter that needs delimiters. No spaces is the format used in raw transmission and in some computer science homework conventions.
Is hexadecimal more efficient than binary for the same data?
Hex represents 4 bits per character, so two hex digits encode the same byte that takes 8 binary digits to write. For human readability, hex is denser (HELLO is 48 65 4C 4C 4F in hex, 40 binary digits compressed into 10 hex digits). Binary is what hardware actually stores; hex is what programmers actually read.
Related Tools
Text to Morse Code
Convert text to Morse code instantly. Free text to morse code translator online.
Slug Generator
Convert any title or text into a clean URL-friendly slug. Options for separator style, max length and accent transliteration. Copy to clipboard instantly.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text. Supports UTF-8 with auto-convert mode and copy buttons