Stax
Tools

Binary Text Converter

Convert text to binary, hex, or octal — and decode back.

コンピューティングにおける数値基数

クイック変換表

このコンバーターの使い方

コンピューターはすべてを2進数(基数2)で保存します。人間は日常的に10進数(基数10)を使います。16進数(基数16)と8進数(基数8)は2進数の便利な省略表記として使われており、4ビットと3ビットのまとまりに分割することで長い2進数をはるかに読みやすくします。

コンピューターサイエンスの学生はメモリへの文字の保存方法を理解し、文字エンコーディングに関する課題を完成させるためにテキストから2進数への変換を使います。セキュリティ研究者はファイルヘッダーやネットワークパケットの2進数および16進数表現を分析します。低レベルプロトコル(BLE・CANバス・Modbus)を扱う開発者は人間が読めるテキストと16進数バイト文字列の間で変換する必要があります。教育者はプログラミング基礎科目でASCIIテーブルと文字エンコーディングを説明するために使います。

ASCII規格は128文字(英語の文字・数字・制御文字)に7ビットコード(0〜127)を割り当てます。拡張ASCII(128〜255)は8ビットを使ってアクセント付き文字をカバーします。Unicodeはこれを大幅に拡張し、UTF-8エンコーディングで1〜4バイト/文字を使って140,000文字以上を扱います。このコンバーターは生の文字コードポイントを使って動作し、ASCIIと拡張ASCIIは正しく処理されます。マルチバイトUnicode文字(絵文字・デーヴァナーガリー・CJK)の場合、2進数出力はUTF-8バイト列ではなくJavaScriptのコードポイントを反映します。

2進数はコンピューターの母国語ですが冗長です——1バイトが8文字必要です。16進数は同じバイトをわずか2文字で表現でき、メモリダンプ・パケットキャプチャ・暗号ハッシュが格段に読みやすく比較しやすくなります。SHA-256ハッシュは16進数で64文字ですが、2進数では256文字になります。8進数はかつてUnixのファイル権限(chmod 755)に使われており、3桁の8進数で3グループ3ビットの権限をうまく表現できます。

  • 2進数 01001000 = 10進数 72 = 16進数 48 = 8進数 110 = 'H'
  • 2進数 01100101 = 10進数 101 = 16進数 65 = 8進数 145 = 'e'
  • 2進数 01001100 = 10進数 76 = 16進数 4C = 8進数 114 = 'L'
  • テキスト → 2進数:任意のテキストを入力するとスペース区切りの8ビットバイトが得られます
  • 2進数 → テキスト:スペース区切りの2進数バイトを貼り付けます(例:01001000 01101001)
  • テキスト → 16進数:各文字が2桁の大文字16進数コードになります
  • 16進数 → テキスト:スペース区切りの16進数バイトを貼り付けます(例:48 65 6C 6C 6F)

よくある質問

How is text converted to binary?
Each character in the text is converted to its ASCII (or Unicode) code point. That number is then written in base 2 (binary), padded to 8 bits. For example, 'H' is ASCII 72, which is 01001000 in binary. Each byte (8-bit group) represents one character.
How do I read binary code?
Binary uses only digits 0 and 1. Each group of 8 bits (a byte) represents one character. To decode: split binary into groups of 8 bits, convert each group from base 2 to decimal, then look up the decimal value in the ASCII table. For example, 01001000 = 72 = 'H'.
What is hexadecimal (hex) and how is it used in computing?
Hexadecimal (base 16) uses digits 0–9 and A–F. Each hex digit represents 4 bits, so 2 hex digits represent 1 byte. Hex is widely used in computing for colour codes (#FF5733), memory addresses (0x7fff), character encodings (U+0041 = 'A'), and cryptographic hashes. It is more compact and readable than raw binary.
What is octal and where is it used?
Octal (base 8) uses digits 0–7. Each octal digit represents 3 bits. Octal is historically used in Unix file permissions (chmod 755), older programming languages (C/C++ octal literals with leading 0), and embedded systems. It is less common than hex in modern programming.
Does this converter support Unicode / emoji?
This converter works with ASCII characters (0–127) and extended ASCII (128–255). For Unicode characters beyond the Basic Latin block (emoji, Devanagari, Chinese, etc.), the conversion uses the character's code point, which may be larger than a single byte.

関連ツール