Hex デコーダー・エンコーダー

どんな形式の Hex でも貼り付ければすぐにテキストに変換、テキストを Hex にも変換できます。この Hex は何?と思ったら、AI が説明し、中の Base64・gzip・XOR まで解読します。

タグ一覧: 16進数エンコード/デコード エンコーダー

🚀 合計 177,388 回変換 (今月 279 回)
バイト解析
サイズ
10進数
リトルエンディアン
符号付き
2進数
8進数
UUID
色
Base64
Hex ダンプ

      

Pythonのコーディングチャレンジで練習

このエディターで実践的な問題を解こう。サンプルテストを実行し、提出してAIコードレビューを受けられます。

すべてのPythonチャレンジ
簡単

長方形の周の長さ

辺の長さから長方形の周の長さを計算します。

学べること 算術戻り値
初級Learning-pathVariables
簡単

2 点間の距離

2 点を結ぶ直線の距離を求めます。

学べること 三平方の定理平方根
初級関数Learning-path数学
簡単

3 つの数の平均

3 つの整数の平均を求めます。

学べること 算術除算
初級Learning-pathVariables
簡単

素数判定

数が素数かどうかを判定してください。

学べること 割り切れるかの判定ループの最適化
初級ループ数値初心者向け
簡単

2つのベクトルの内積

2つのベクトルを要素ごとに掛けて合計します。すべてのニューロンの中心となる計算です。

学べること ベクトル内積
ニューラルネットワークai機械学習
簡単

大文字を数える

テキストに含まれる大文字を数えます。

学べること 文字の判定カウント
初級Learning-pathStrings
簡単

摂氏から華氏への変換

摂氏温度を華氏温度に変換してください。

学べること 公式演算子の優先順位
初級Learning-pathVariables
簡単

月の日数

うるう年も考慮して、その月が何日あるかを返します。

学べること 暦の規則補助関数
初級条件分岐関数Learning-path
簡単

3 つの数の最大値

組み込みの max を使わずに、3 つの数の最大値を選びます。

学べること 比較条件の組み合わせ
初級条件分岐Learning-path
簡単

成績の評価記号

テストの点数を成績の評価記号 (アルファベット) に変換します。

学べること if/elif の連鎖値の範囲
初級条件分岐Learning-path
簡単

最小値と最大値を同時に

1 回の走査で最小値と最大値を求めます。

学べること 1 回の走査複数の戻り値
Arrays初級関数Learning-path
簡単

単利

単利で増えた後の合計金額を求めます。

学べること パーセント文章題
初級Learning-pathVariables

はじめに

このオンライン16進エンコーダーツールは、文字列を16進形式に変換したり、元に戻したりするのを簡単にします。テキストや数字を扱う際、このツールはプロセスを簡素化し、時間を節約します。

このツールの使い方

  1. エディターに文字列を直接貼り付けるか、入力します。
  2. エンコードまたはデコードボタンをクリックして、文字列を16進形式に変換または元に戻します。
  3. エンコードまたはデコード後、以下のことができます:
    • 結果をダウンロードする。
    • 短縮リンクを使って他の人と保存または共有する。
    • GoogleまたはGitHubでサインインして、結果をアカウントに保存し、後で使用する。

16進数とは?

16進数(またはhex)は、バイナリデータの表現を簡素化するための基数16の数値システムです。16のシンボルを使用します:0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F。各16進数字は4ビットのバイナリシーケンスを表し、バイナリ数をより簡単に書いたり読んだりできます。

例えば:

  • バイナリから16進数へ: 11010100 → D4
  • 16進数からバイナリへ: FFFF3 → 11111111111111110011

なぜ16進数を使うのか?

16進数は、コンピューティングやデジタルシステムでよく使用されます。これはバイナリよりもコンパクトで読みやすいためです。メモリアドレス、カラーコード、ASCIIやUnicode文字セットでのデータ表現によく使用されます。

詳細については、この 便利なガイドをチェックしてください。

例

エンコード前

      
Hello, World!
      
    

エンコード後

      
48656c6c6f2c20576f726c6421
      
    

Hex をテキストにデコード: 対応している形式

見つけたままの形で16進数を貼り付けてください。デコーダーがスペース、カンマ、コロン、0x・\x・% の接頭辞を取り除き、2桁ごとに1バイトに変換します。

貼り付ける Hex得られるテキスト
48656c6c6fHello
48 65 6c 6c 6fHello
0x48 0x65 0x6c 0x6c 0x6fHello
\x48\x65\x6c\x6c\x6fHello
48:65:6c:6c:6fHello
c3 a9 74 c3 a9été
f0 9f 98 80😀

バイトは UTF-8 として読み取るため、日本語、中国語、韓国語、キリル文字、アクセント付き文字、絵文字も正しくデコードされます。

Hex は暗号ですか?

パズルや CTF では「hex 暗号」と呼ばれることがありますが、hex は暗号化ではなくエンコーディングです。2桁で1バイトを表すだけなので、このようなデコーダーで誰でも元に戻せます。データを隠すには本物の暗号化を、改ざんの確認には SHA-256 などのハッシュを使いましょう。

Hex を手作業でデコードする方法

16進数を2桁ずつに区切ります。それぞれ 0 から 255 の数で、1桁目が16の位、2桁目が1の位です (a = 10 から f = 15)。その数を ASCII 表で調べると文字がわかります。

48 → 4 × 16 + 8 = 72 → "H"
65 → 6 × 16 + 5 = 101 → "e"
6c → 6 × 16 + 12 = 108 → "l"

Base64 の場合は? Base64 を Hex に変換

Hex to ASCII table

Printable ASCII characters by hex value: row is the first digit, column the second. 41 is "A", 61 is "a", 20 is a space.

0123456789ABCDEF
2 ␠ ! " # $ % & ' ( ) * + , - . /
3 0 1 2 3 4 5 6 7 8 9 : ; < = > ?
4 @ A B C D E F G H I J K L M N O
5 P Q R S T U V W X Y Z [ \ ] ^ _
6 ` a b c d e f g h i j k l m n o
7 p q r s t u v w x y z { | } ~ DEL

Decode hex in code

The same conversion in common languages (UTF-8 text):

# Python
bytes.fromhex("48656c6c6f").decode("utf-8")          # 'Hello'
"Hello".encode().hex()                               # '48656c6c6f'

// JavaScript (Node.js)
Buffer.from("48656c6c6f", "hex").toString("utf8")    // 'Hello'
Buffer.from("Hello").toString("hex")                 // '48656c6c6f'

// Go
b, _ := hex.DecodeString("48656c6c6f")               // string(b) == "Hello"

// PHP
hex2bin("48656c6c6f");                               // 'Hello'

// C#
Encoding.UTF8.GetString(Convert.FromHexString("48656c6c6f"));

# Bash
echo 48656c6c6f | xxd -r -p                          # Hello

Hex decoder FAQ

How do I decode hex to text?

Paste the hex into the right box. It turns into text on the left as you type, in any format: 48656c6c6f, 48 65 6c 6c 6f, 0x48 0x65, \x48\x65, 48:65 or a hex dump from xxd. Type text on the left to get its hex.

Why does the decoded text show strange characters?

The bytes are not text in the selected encoding. Try UTF-16 or Latin-1 in "Text encoding". If it still looks like noise, the hex is binary data such as a hash, a key or a file: the byte inspector shows what it probably is, and Explain with AI can tell you more.

What does 0x mean in hex?

0x marks a hexadecimal number in C, Java, JavaScript, Python and most other languages, so 0x41 is 65 in decimal, the letter "A". The decoder removes 0x, \x and % prefixes for you.

How do I convert hex to decimal?

Paste the hex and look at the byte inspector: it shows the number in decimal (big-endian and little-endian), signed, binary and octal. For example FF is 255, and 01 00 is 256 in big-endian or 1 in little-endian.

What is the difference between hex and Base64?

Both write bytes as text. Hex uses two characters per byte, so it doubles the size but is easy to read. Base64 uses four characters for every three bytes, about 33% bigger, which is why it is used in emails, data URLs and JSON. If you paste Base64 here, the page offers to convert it.

Can I decode a hex dump or a whole file?

Yes. Paste output from xxd or hexdump -C and the offsets and text columns are ignored. Use "Open file" to see any file as hex, and "Download bytes" to save decoded hex as a file: PNG, JPEG, PDF, ZIP and other types are detected from their first bytes.

What does Explain with AI do?

It tells you what an unknown hex string probably is: a hash, a UUID, a file header, a network packet or text that is encoded again (Base64, gzip, XOR, ROT13). When more decoding steps are needed, your browser runs them and shows the result, so you see the real decoded data, not a guess.

Is my data sent to a server?

No. Decoding, encoding and the byte inspector run in your browser. The hex is only sent when you press Explain with AI, and then only to answer that question.