DevToolBox

HEX Converter

16進数・10進数・2進数・テキストを相互変換します。入力の形式は自動判定し、変換できる形式をすべて同時に表示します。

例:

入力すると、変換できる形式をすべて同時に表示します。モードの選択は不要です。
Type anything — every possible conversion appears at once. No mode to pick.

How to Use the HEX Converter

This free online HEX converter turns hexadecimal, decimal, binary and plain text into each other instantly in your browser. There is no mode to choose. Paste whatever you have — 1A3, 0x1F, FF, 48 65 6C 6C 6F or Hello — and every conversion that applies to it appears at once, each with its own copy button.

A value is read two ways at the same time, because both are useful. As a number, 1A3 is 419 in decimal, 110100011 in binary and 643 in octal, and the calculation is spelled out digit by digit. As a byte sequence, the same input is 01 A3, which is how you would see it in a hex dump. Hexadecimal output uses space-separated uppercase (e.g. "48 65 6C 6C 6F" for "Hello"), the format used by debugging, network analysis and data inspection tools, and a joined form is provided alongside it.

The input format is detected automatically, and the detected choice is shown as a highlighted chip. Because some inputs are genuinely ambiguous — 100 is a valid hexadecimal, decimal and binary number — you can override the interpretation with one click and every output updates together.

Understanding Hexadecimal Notation

Hexadecimal (base 16) is a numeral system that uses sixteen distinct symbols: the digits 0 through 9 represent values zero to nine, and the letters A through F represent values ten to fifteen. Each hex digit represents exactly four bits (a nibble), making it a convenient shorthand for binary data. Two hex digits represent one byte (8 bits), which can hold values from 00 to FF (0 to 255 in decimal). This compact representation is why hexadecimal is ubiquitous in computing -- from color codes in CSS (#FF5733) to memory addresses, MAC addresses, and raw data dumps.

Text to HEX Conversion

When converting text to hexadecimal, each character is first encoded as bytes using UTF-8 encoding, then each byte is represented as a two-digit hexadecimal number. ASCII characters like letters and digits produce one byte (two hex digits) each, while non-ASCII characters such as Japanese, Chinese, or emoji produce multiple bytes. For example, the letter "A" becomes "41", while a Japanese character like "a" becomes "E3 81 82" (three bytes in UTF-8). This conversion is useful for inspecting raw byte content, debugging encoding issues, and preparing data for protocols that require hex-encoded payloads.

Binary and HEX Interconversion

Converting between binary and hexadecimal is straightforward because each hex digit maps to exactly four binary digits. For example, hex "4F" equals binary "01001111". The tool expects space-separated groups of 8 binary digits (one byte each) for Binary to HEX conversion, and space-separated pairs of hex digits for HEX to Binary conversion. This is essential for low-level programming, hardware design, and understanding bit-level data representations. Input validation ensures that only valid characters are accepted, with clear error messages in Japanese for any invalid input.

Decimal and HEX Interconversion

HEX to Decimal converts each space-separated byte to a decimal value from 0 to 255, while Decimal to HEX converts those values back to two-digit uppercase hexadecimal.

Features

  • No mode selection — every applicable conversion is shown at the same time
  • Hex numbers of any length, with or without a 0x prefix (1A3, 0x1F, FFFFFFFF)
  • Digit-by-digit calculation steps for hex to decimal
  • Space-separated hex format for readability
  • UTF-8 encoding for text conversion
  • Input validation with Japanese error messages
  • One-click copy to clipboard
  • Client-side only -- your data stays in your browser

HEX変換ツールの使い方

この無料オンラインツールは、16進数・10進数・2進数・テキストを相互変換します。変換モードを選ぶ必要はありません。1A30x1FFF48 65 6C 6C 6FHello のように、手元にあるものをそのまま貼り付けると、 変換できる形式がすべて同時に表示されます。各行にコピーボタンが付いています。

入力は「数値として」と「バイト列として」の2通りで同時に解釈します。 たとえば 1A3 は、数値としては10進419・2進110100011・8進643であり、 その計算過程も桁ごとに表示します。同じ入力をバイト列として見ると 01 A3 で、 これはHEXダンプで目にする形です。

入力形式は自動判定し、判定結果をチップで表示します。100 のように16進・10進・2進のどれとしても読める入力もあるため、 解釈はワンクリックで切り替えられ、切り替えると全ての出力が一斉に更新されます。 全ての処理はブラウザ上で完結します。

16進数とは

16進数は0-9とA-Fの16個の記号を使う記数法です。2桁の16進数で1バイト(0-255)を表現でき、 バイナリデータの簡潔な表記として広く使われています。CSSの色コード(#FF5733)、 メモリアドレス、MACアドレスなど、プログラミングの様々な場面で登場します。

テキストとHEXの変換

テキストからHEXへの変換では、UTF-8エンコーディングでバイト列に変換した後、 各バイトを2桁の16進数で表現します。ASCII文字は1バイト、日本語文字は通常3バイト、 絵文字は4バイトとなります。エンコーディングの問題をデバッグする際に便利です。

Hex to Byte Converter — what the bytes mean

When you use this page as a hex to byte converter, each two-digit pair (00–FF) maps to one byte (0–255). Spaces between pairs are optional separators for readability. Converting hex to bytes is the first step when you inspect binary protocols, file headers (magic numbers like 89 50 4E 47 for PNG), or debug character encoding issues — and converting hex back to text decodes those bytes as UTF-8.

よくあるエラーと対処 / Common Errors and Fixes

エラー / Error原因 / Cause対処 / Fix
無効なHEX値
Invalid hex value
0-9, A-F 以外の文字(O と 0、l と 1 の混同が典型)
Characters outside 0-9/A-F — often O vs 0 or l vs 1 confusion
コピー元を確認。プレフィックス 0x や区切りのカンマは除去する
Strip 0x prefixes and comma separators before pasting
奇数桁のHEX
Odd number of hex digits
1バイト=2桁のため、奇数桁はバイト列に変換できない
One byte needs exactly two digits; odd-length input is ambiguous
先頭に 0 を補う(例: F → 0F)か、欠落した桁を確認
Left-pad with 0 (F → 0F) or find the missing digit
HEX→テキストが文字化け・失敗
Hex to text fails or shows garbage
バイト列が UTF-8 として不正(Shift_JIS等の別エンコーディング、または画像等のバイナリ)
The bytes are not valid UTF-8 — different encoding or pure binary data
元データのエンコーディングを確認。バイナリはテキスト化せず HEX のまま扱う
Verify the source encoding; keep binary data as hex
エンディアンの取り違え
Endianness mix-up
多バイト数値はリトルエンディアンだとバイト順が逆(0x1234 → 34 12)
Little-endian stores multi-byte numbers in reverse byte order
数値として解釈する場合はプロトコル仕様のバイト順を確認
Check the protocol's byte order before interpreting as numbers
日本語が想定よりバイト数が多い
Japanese text yields more bytes than expected
UTF-8では日本語は1文字3バイト、絵文字は4バイト以上
UTF-8 encodes Japanese in 3 bytes, emoji in 4+ bytes
仕様。バイト数制限のあるシステムでは事前にバイト長を確認する
By design — check byte length against system limits

言語別コード例 / Code Examples

JavaScript

// テキスト → HEX
const hex = Array.from(new TextEncoder().encode("Hello"))
  .map((b) => b.toString(16).padStart(2, "0")).join(" ");
// "48 65 6c 6c 6f"

// HEX → テキスト
const bytes = new Uint8Array("48 65 6c 6c 6f".split(" ").map((h) => parseInt(h, 16)));
const text = new TextDecoder().decode(bytes); // "Hello"

Python

"Hello".encode("utf-8").hex(" ")        # '48 65 6c 6c 6f'
bytes.fromhex("48 65 6c 6c 6f").decode() # 'Hello'

Shell (xxd)

printf 'Hello' | xxd -p     # 48656c6c6f
echo 48656c6c6f | xxd -r -p  # Hello

Go

import "encoding/hex"
h := hex.EncodeToString([]byte("Hello"))  // "48656c6c6f"
b, _ := hex.DecodeString("48656c6c6f")    // []byte("Hello")

変換例 / Before & After

テキスト → HEX:
"Hello"   → 48 65 6C 6C 6F
"こんにちは" → E3 81 93 E3 82 93 E3 81 AB E3 81 A1 E3 81 AF  (3バイト×5文字)

HEX → バイナリ:
48 65 → 01001000 01100101

ファイルヘッダの識別(マジックナンバー):
89 50 4E 47 → PNG画像 / FF D8 FF → JPEG / 50 4B → ZIP

Why browser-only?

Hex dumps often come from places you should not paste into random websites: memory dumps, packet captures, auth tokens, or proprietary file formats. This hex to byte converter runs entirely in your browser with TextEncoder/TextDecoder — the data never leaves your device, there is no upload, no logging, and it keeps working offline. Verify it yourself in the DevTools Network tab.

HEXダンプの中身はメモリダンプ・パケットキャプチャ・トークンなど機密データであることが多いもの。 本ツールは変換の全てがブラウザ内で完結し、データは一切外部送信されません。

関連ガイド / Related Guides

安全性とプライバシー/ Privacy & Security

ブラウザ内で完結

処理はすべてお使いのブラウザ内のJavaScriptで実行され、入力データはサーバーに送信されません

外部送信なし

入力内容を広告ネットワークや解析サービスへ送ることはありません

通信はHTTPSで暗号化

ページの配信はすべてTLSで暗号化されています

登録不要・無料

アカウント登録なしで全機能を無料で使えます