テキスト・バイナリ変換

テキストをバイナリ(UTF-8)に、バイナリをテキストに変換。1バイト8ビット。サーバーへアップロードなし。

ガイドを見る

ガイド

What does this tool do

The Text to Binary Converter converts plain text to binary (0s and 1s) and back. Encode any UTF-8 text to 8-bit binary per byte, or decode a binary string to plain text. Supports optional spacing between bytes for readability. All processing runs in your browser—no server upload.

How to use it

  1. Choose mode — Switch between Text → Binary (encode) and Binary → Text (decode).
  2. Set separator (encode only) — Choose "Space between bytes" for readable output, or "No separator" for a continuous string.
  3. Enter input — For encode: type or paste text. For decode: paste a binary string (0s and 1s; spaces are ignored).
  4. View output — The result appears after clicking Convert. Invalid binary shows an error.
  5. Copy — Use the copy button to copy the output to the clipboard.

How it works

Encode: The input is encoded to UTF-8 via TextEncoder, then each byte is converted to an 8-bit binary string (zero-padded). Bytes can be joined with or without spaces. Decode: Spaces are stripped from the input, which must contain only 0 and 1. The string is split into 8-bit groups, converted to bytes, then decoded to UTF-8 via TextDecoder. Invalid binary (wrong characters, length not divisible by 8, invalid UTF-8) returns an error. Input is limited to 500KB to avoid heavy main-thread work.

All computation runs entirely in your browser. No data is sent to any server.

Use cases & examples

  • Learning — Understand how text is represented in binary.
  • Encoding — Encode messages or data for transmission.
  • Debugging — Inspect byte-level representation of strings.
  • Education — Teach ASCII/UTF-8 and binary representation.

Example

  • Encode Hello01001000 01100101 01101100 01101100 01101111 (with space)
  • Encode A01000001 (or 01000001 without separator)
  • Decode 01001000 01100101 01101100 01101100 01101111Hello

Limitations & known constraints

  • Input size — Maximum ~500KB (512,000 characters) to prevent browser slowdown.
  • Encoding — UTF-8 only; other encodings (e.g. Latin-1) not supported.
  • Binary format — 8 bits per byte; variable-length encodings (e.g. UTF-8 multi-byte sequences) are represented byte by byte.
  • Empty decode — Empty input in decode mode returns an error.

すべての計算と変換はブラウザ内で完全に実行されます。データはサーバーに送信されず、入力内容はデバイスから離れません。