Text to Binary
Convert text to binary, hexadecimal and octal, and vice versa.
About this tool
The Text to Binary converter displays the bit representation of each character in a text, based on JavaScript's UTF-16 character encoding. In addition to binary, the tool also shows the hexadecimal and octal representations of the same text in a single view, making it easy to analyze data in multiple bases simultaneously.
To use it, just type or paste any text in the field. Results appear instantly in three formats: **binary** (each character as 8 bits separated by spaces), **hexadecimal** (two hex digits per character) and **octal** (three octal digits per character). The tool also recognizes binary input: if you paste a sequence of 0s and 1s grouped into 8-bit blocks, it automatically converts them back to text.
This type of tool is essential for computer science students learning data representation, developers debugging encoding issues, security professionals analyzing payloads in CTF (Capture the Flag) challenges, and enthusiasts who want to understand how computers store text internally.
All conversion uses native JavaScript operations in the browser. No data is sent to external servers and no sign-up is needed.
Frequently asked questions
Is the tool free?
Yes, completely free.
Is my data sent to a server?
No. All conversion happens locally in your browser, with no external communication.
Does it work on mobile?
Yes, in any modern browser for Android and iOS.
Why does each character have 8 bits?
The tool uses the Unicode code point of the character (via charCodeAt), which for ASCII characters and most of the Latin alphabet fits in 8 bits. Characters with code points above 255 may produce larger representations.
How does automatic binary detection work?
If the input contains only 0s, 1s and spaces, and is at least 8 characters long, the tool interprets it as a binary sequence and converts it to text. Otherwise, it converts text to binary.