Binary Encoder/Decoder
Free online binary encoder/decoder, no installation required. Convert text to and from binary (0/1)
About Binary Encode/Decode
Convert text to and from 8-bit binary strings. Encoding maps each character to its char code and pads it to 8 bits, joining bytes with spaces. Decoding strips whitespace, splits on spaces, parses each group as base 2, and renders the corresponding ASCII character. Decode rejects any input containing characters other than 0, 1, and whitespace.
How to Use
1. Toggle the Encode or Decode mode tab.\n2. In Encode mode, enter plain text; in Decode mode, enter space-separated binary groups such as 01001000 01101001.\n3. Click the Encode / Decode button.\n4. Copy the result with the Copy button. Decode mode shows an error if the input contains anything besides 0, 1, or whitespace.
Byte Encoding Details
Encode uses charCodeAt(0).toString(2) padded to 8 digits, so each character produces exactly 8 bits regardless of its code point — characters above U+00FF only use the low byte and will lose information. Decode splits the input on any run of whitespace (spaces, tabs, newlines), treats each token as a binary number, and calls String.fromCharCode. Tokens that parse to NaN are dropped. The expected use case is plain ASCII text.
▶Why does the output have spaces between the binary groups?
▶Can it handle Unicode or emoji?
▶Why does decode fail on my input?
▶Does each binary group have to be exactly 8 bits?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee