文字toBinary
免費線上文字toBinary。在瀏覽器中即時處理資料。無上傳,無註冊,完全私密。
Local processingWhat is 文字toBinary?
A text-to-binary converter encodes each character of input text into its 8-bit binary representation (a string of 0s and 1s). Computers store all data as binary; this tool makes that representation visible, which is useful for learning how text is encoded, debugging low-level protocols, and creating binary art. The decoder reverses the process, parsing groups of 8 bits back into characters.
How It Works
Encoding uses TextEncoder to convert the input string into UTF-8 bytes, then each byte is rendered as an 8-character binary string via toString(2) padded with leading zeros. The bits are typically space-separated for readability. Decoding splits the binary string on whitespace, parses each 8-bit group as a base-2 integer, collects the bytes, and decodes them back to a UTF-8 string via TextDecoder. Multi-byte UTF-8 characters (emoji, CJK) produce multiple bytes.
Common Use Cases
- Learning how text is stored — see the binary representation of ASCII and UTF-8 characters
- Debugging low-level protocols — inspect the exact bytes a string produces
- Creating binary puzzles or art — convert a message into bits for a challenge
- Verifying encoding correctness — confirm a string's byte sequence matches expectations
Technical Details
Encoding: UTF-8 via TextEncoder (variable-width: ASCII = 1 byte, emoji = 4 bytes). Each byte → 8 binary digits (toString(2) padded to 8). Output is space-separated 8-bit groups. Decoding parses base-2 groups and uses TextDecoder for UTF-8. ASCII characters (0-127) produce a single byte; multi-byte characters produce proportionally more bits. The tool is bidirectional and lossless for valid UTF-8.
How to Use
Enter your input above. The result updates automatically. Use the copy button to copy the result.
Privacy
All processing happens in your browser. Your data is never uploaded to any server.
FAQ
這個文字toBinary免費嗎?
是的,完全免費。無需註冊。
這個工具會上傳我的資料嗎?
不會。所有處理都在瀏覽器中本機完成。您的資料永遠不會離開您的裝置。
What character encoding is used?
The tool uses UTF-8 encoding via the browser's TextEncoder/TextDecoder APIs. ASCII characters (0-127) produce a single 8-bit byte; multi-byte characters like emoji or CJK produce 2-4 bytes, each rendered as an 8-bit binary group. The conversion is bidirectional and lossless for valid UTF-8.