About this tool
Convert text to binary and binary back to text instantly. ASCII/Latin-1 characters map to 8 bits each; higher code points use more bits.
This converts text to binary and binary back to text: each character is taken as its character code and written as an 8-bit binary number, padded with leading zeros and separated from the next by a space. Type in either box and the other side updates instantly, so 'A' shows as 01000001 (code 65) and a pasted stream of space-separated bytes decodes straight back to readable characters. It is aimed at students working through number bases and at developers eyeballing what a byte actually contains.
Open Text to Binary / Binary to Text on AltFTool — it loads instantly in your browser.
Type or paste text into the Text Input pane, or press Swap and paste space-separated 8-bit binary groups instead.
The opposite pane converts live: each character becomes a zero-padded 8-bit byte like 01000001, and invalid binary raises the error that input can only contain 0, 1 and spaces.
Press Copy under either pane, or Download to save the converted output as text-to-binary-output.txt or binary-to-text-output.txt.
Edit either pane and the other rewrites immediately, and Swap flips which side is the input without retyping anything.
Anything other than 0, 1 and spaces in the binary pane raises an explicit error instead of silently decoding to garbage characters.
Each pane shows its character count, with whitespace excluded from the binary count, so you can confirm the 8-bits-per-character relationship at a glance.
Each character is looked up as its numeric character code and that number is written in base 2, zero-padded to 8 digits. 'H' is code 72, which is 01001000; a space is code 32, or 00100000. Bytes are joined with a single space so each group of 8 is readable.
Because standard ASCII covers codes 0 to 127 and its extended forms reach 255, both of which fit in one 8-bit byte. That is why the classic rule of thumb — one plain-text character, one byte — holds for English text.
Characters with codes above 255 produce groups longer than 8 bits, because the value is converted directly rather than encoded as UTF-8 multi-byte sequences. Latin-1 accented letters such as é (code 233) still fit in 8 bits, but for emoji and most non-Latin scripts the output will not match what a UTF-8 encoder produces.
Space-separated groups of ones and zeros, normally 8 per group. Line breaks and extra spaces between groups are tolerated because the input is split on any run of whitespace, but any other character triggers a validation error rather than a partial decode.
Add the Text to Binary / Binary to Text widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.
<iframe src="https://www.altftool.com/embed/widget/text-to-binary"
title="Text to Binary / Binary to Text — free AltFTool widget"
width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/text-to-binary?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>