Binary to Text Converter
テキストと8bit区切りの2進数をUTF-8で直接相互変換します。日本語・絵文字対応、全てブラウザ内で処理。
UTF-8の各バイトを8桁の2進数にし、スペースで区切ります。
How to Use the Binary to Text Converter
Select Text → Binary, enter text, and click convert to produce one space-separated 8-bit group per UTF-8 byte. For the reverse operation, select Binary → Text and enter groups containing only zeros and ones. Each group may contain up to eight bits; shorter groups are left-padded with zeros. Both syntax and the resulting UTF-8 sequence are validated.
From Characters to UTF-8 Bytes
Unicode assigns each character a code point, while UTF-8 serializes that code point into one to four bytes. This converter shows those serialized bytes, not the binary spelling of the code point. ASCII H is decimal 72 and becomes 01001000; Japanese characters and most emoji span multiple groups.
Byte Boundaries and Bit Order
Each group is one octet, with the most significant bit on the left. Spaces preserve byte boundaries but are not encoded data. This is useful for programming education and protocol documentation, although protocol fields may cross byte boundaries and need not be UTF-8.
ASCII, UTF-8, and Protocol Data
UTF-8 preserves ASCII: U+0000 through U+007F use the same one-byte values. Other characters use multibyte sequences with prefixes such as 110xxxxx and 10xxxxxx. Packets may contain flags, checksums, compressed data, or ciphertext, so only valid UTF-8 sequences become text here.
使い方
「テキスト → 2進数」を選び、文字列を入力すると、UTF-8の各バイトが8桁・スペース区切りの2進数になります。逆変換では0と1だけからなる最大8桁のグループを空白で区切ってください。短いグループは左側を0で補います。
2進数の基礎と8bit
2進数は0と1で値を表します。8桁の各位置は左から128、64、32、16、8、4、2、1の重みを持ち、合計で0〜255を表現します。01001000は10進数の72、ASCII文字のHです。
UnicodeコードポイントとUTF-8は別物
Unicodeは文字にコードポイントを割り当て、UTF-8は保存・通信用のバイト列へ符号化します。「日」(U+65E5)はUTF-8ではE6 97 A5、つまり11100110 10010111 10100101という3バイトです。
学習と通信プロトコルでの利用
文字・文字コード・バイトの関係を可視化できるため、プログラミング教育やエンコーディングのデバッグに適しています。通信仕様のビットフラグや任意パケットはUTF-8とは限らないため、その場合はHEX表記も併用してください。
よくあるエラーと対処 / Common Errors and Fixes
| 症状 / Error | 原因 / Cause | 対処 / Fix |
|---|---|---|
| 2や英字でエラー Characters other than 0/1 fail | 2進数は0と1のみ Binary accepts only zero and one | 0bを除き空白で区切るRemove 0b and separate groups |
| 9桁以上でエラー A group has 9+ bits | 1バイトの上限を超過 It exceeds one byte | 8bitごとに空白を入れる Split every eight bits |
| 有効なUTF-8ではない Invalid UTF-8 | マルチバイト列の欠損、または非テキスト Missing bytes or non-text data | 全バイトを確認し、任意バイナリならHEX Converterを使う Verify bytes or use HEX Converter |
| 日本語1文字が3グループ One Japanese character makes three groups | 多くの日本語文字はUTF-8で3バイト Most require three UTF-8 bytes | 正常。文字数ではなくバイト数として読む Expected; count bytes, not characters |
言語別コード例 / Code Examples
JavaScript
const bytes = new TextEncoder().encode("Hi");
const binary = [...bytes].map(b => b.toString(2).padStart(8, "0")).join(" ");
const restored = new TextDecoder("utf-8", { fatal: true })
.decode(Uint8Array.from(binary.split(/\s+/), bits => parseInt(bits, 2)));Python
text = "Hi"
binary = " ".join(f"{byte:08b}" for byte in text.encode("utf-8"))
values = bytes(int(bits, 2) for bits in binary.split())
restored = values.decode("utf-8")Go
func toBinary(text string) string {
parts := make([]string, len([]byte(text)))
for i, b := range []byte(text) { parts[i] = fmt.Sprintf("%08b", b) }
return strings.Join(parts, " ")
}
func fromBinary(input string) (string, error) {
fields := strings.Fields(input)
out := make([]byte, len(fields))
for i, bits := range fields {
value, err := strconv.ParseUint(bits, 2, 8)
if err != nil { return "", err }
out[i] = byte(value)
}
return string(out), nil
}Before / After 実例
ASCII
Hi → 01001000 01101001日本語UTF-8 / Japanese UTF-8
日 → 11100110 10010111 10100101逆変換 / Reverse
01001000 01100101 01101100 01101100 01101111 → Helloスペースは読みやすさのためのバイト区切りで、変換対象データには追加されません。
Why browser-only? / なぜブラウザ完結か
Pasted text may contain source code, identifiers, logs, or confidential material. UTF-8 encoding, binary parsing, validation, and decoding all run inside this browser tab using built-in Web APIs. No external API request is made, so input does not need to leave your device.
変換対象にはソースコード、識別子、ログなどの機密情報が含まれる場合があります。本ツールはUTF-8変換、2進数解析、検証をブラウザ標準APIだけで実行し、外部APIへ入力内容を送信しません。
関連ツール・ガイド / Related Tools and Guides
- HEX Converter — UTF-8バイト列を16進数で確認し、任意バイナリを扱えます。
- Text / ASCII Code Converter — ASCII値やUnicodeコードポイントを比較できます。
- Number Base Converter — 数値を2進・8進・10進・16進で相互変換します。
- Unicode Inspector — 不可視文字を含むコードポイントを調査できます。
関連ツール / Related Tools
開発をもっと効率的に
PR
レンタルサーバー
エックスサーバー
国内シェアNo.1の高速レンタルサーバー(エックスサーバー社調べ)。WordPressも簡単セットアップ。
詳しく見る →レンタルサーバー
ConoHa WING
国内最速クラスのレンタルサーバー。独自ドメイン永久無料特典付き(特典内容は変更される場合があります)。
詳しく見る →レンタルサーバー
mixhost
高速SSD・HTTP/3対応のクラウド型レンタルサーバー。
詳しく見る →VPS
シンVPS
メモリ単価が国内最安水準・オールNVMe SSD搭載の高性能VPS(大容量メモリプラン利用時)。開発・検証環境の構築に。
詳しく見る →Windows VPS
ConoHa for Windows Server
Windows環境のVPS。リモートデスクトップで開発・検証環境を構築。
詳しく見る →