Hex Decoder & Encoder - ถอดรหัส Hex

วาง hex รูปแบบใดก็ได้แล้วได้ข้อความทันที หรือแปลงข้อความเป็น hex ไม่แน่ใจว่า hex นี้คืออะไร? AI จะอธิบายและถอดรหัส Base64, gzip หรือ XOR ที่อยู่ข้างในให้

แท็กต่างๆ: ตัวเข้ารหัส เข้ารหัส/ถอดรหัส hex

🚀 แปลงไปแล้ว 177,388 ครั้ง (เดือนนี้ 279 ครั้ง)
ตัวตรวจไบต์
ขนาด
ฐานสิบ
Little-endian
มีเครื่องหมาย
ฐานสอง
ฐานแปด
UUID
สี
Base64
Hex dump

      

ฝึก Python ด้วยโจทย์เขียนโค้ด

แก้โจทย์จริงใน editor นี้: รันทดสอบตัวอย่าง ส่งคำตอบ และรับรีวิวโค้ดจาก AI

โจทย์ Python ทั้งหมด
ง่าย

ความยาวรอบรูปสี่เหลี่ยมผืนผ้า

คำนวณความยาวรอบรูปของสี่เหลี่ยมผืนผ้าจากความยาวด้าน

คุณจะได้เรียนรู้ เลขคณิตค่าที่คืนกลับ
ผู้เริ่มต้นLearning-pathVariables
ง่าย

ระยะห่างระหว่างจุด

คำนวณระยะทางเป็นเส้นตรงระหว่างสองจุด

คุณจะได้เรียนรู้ ทฤษฎีบทพีทาโกรัสรากที่สอง
ผู้เริ่มต้นฟังก์ชันLearning-pathคณิตศาสตร์
ง่าย

ค่าเฉลี่ยของสามจำนวน

หาค่าเฉลี่ยของจำนวนเต็มสามจำนวน

คุณจะได้เรียนรู้ เลขคณิตการหาร
ผู้เริ่มต้นLearning-pathVariables
ง่าย

ตรวจสอบจำนวนเฉพาะ

ตัดสินว่าตัวเลขเป็นจำนวนเฉพาะหรือไม่

คุณจะได้เรียนรู้ การหารลงตัวปรับลูปให้เร็วขึ้น
ผู้เริ่มต้นลูปตัวเลขนักเรียนมือใหม่
ง่าย

ผลคูณจุดของเวกเตอร์สองตัว

คูณเวกเตอร์สองตัวทีละสมาชิกแล้วรวมผลลัพธ์ ซึ่งเป็นการคำนวณหลักของทุกนิวรอน

คุณจะได้เรียนรู้ เวกเตอร์ผลคูณจุด
โครงข่ายประสาทเทียมaiการเรียนรู้ของเครื่อง
ง่าย

นับตัวพิมพ์ใหญ่

นับจำนวนตัวอักษรพิมพ์ใหญ่ในข้อความ

คุณจะได้เรียนรู้ ตรวจอักขระการนับ
ผู้เริ่มต้นLearning-pathStrings
ง่าย

แปลงเซลเซียสเป็นฟาเรนไฮต์

แปลงอุณหภูมิจากองศาเซลเซียสเป็นองศาฟาเรนไฮต์

คุณจะได้เรียนรู้ สูตรลำดับความสำคัญของตัวดำเนินการ
ผู้เริ่มต้นLearning-pathVariables
ง่าย

จำนวนวันในเดือน

คืนค่าจำนวนวันของเดือนหนึ่ง โดยคำนึงถึงปีอธิกสุรทิน

คุณจะได้เรียนรู้ กฎของปฏิทินฟังก์ชันช่วย
ผู้เริ่มต้นเงื่อนไขฟังก์ชันLearning-path
ง่าย

ค่าที่มากที่สุดในสามจำนวน

เลือกค่าที่มากที่สุดในสามจำนวน โดยไม่ใช้ฟังก์ชัน max สำเร็จรูป

คุณจะได้เรียนรู้ การเปรียบเทียบรวมเงื่อนไข
ผู้เริ่มต้นเงื่อนไขLearning-path
ง่าย

เกรดตัวอักษร

แปลงคะแนนสอบเป็นเกรดตัวอักษร

คุณจะได้เรียนรู้ สายโซ่ if/elifช่วงของค่า
ผู้เริ่มต้นเงื่อนไขLearning-path
ง่าย

ดอกเบี้ยแบบธรรมดา

หายอดเงินรวมหลังได้ดอกเบี้ยแบบธรรมดา

คุณจะได้เรียนรู้ ร้อยละโจทย์ปัญหา
ผู้เริ่มต้นLearning-pathVariables
ปานกลาง

นักเรียนคะแนนสูงสุดในสมุดคะแนน

หานักเรียนที่มีคะแนนเฉลี่ยสูงที่สุด

คุณจะได้เรียนรู้ ลิสต์ 2 มิติค่าเฉลี่ย
ผู้เริ่มต้นฟังก์ชันกริดLearning-path

บทนำ

เครื่องมือเข้ารหัสเลขฐานสิบหกออนไลน์นี้ทำให้ง่ายต่อการแปลงสตริงเป็นรูปแบบเลขฐานสิบหกและกลับมาอีกครั้ง ไม่ว่าคุณจะทำงานกับข้อความหรือตัวเลข เครื่องมือนี้จะทำให้กระบวนการง่ายขึ้นและประหยัดเวลาของคุณ

วิธีการใช้เครื่องมือนี้

  1. วางสตริงของคุณลงในตัวแก้ไขโดยตรงหรือพิมพ์เข้าไป
  2. คลิกปุ่ม Encode หรือ Decode เพื่อแปลงสตริงของคุณเป็นหรือจากรูปแบบเลขฐานสิบหก
  3. หลังจากการเข้ารหัสหรือถอดรหัส คุณสามารถ:
    • ดาวน์โหลดผลลัพธ์
    • บันทึกหรือแชร์กับผู้อื่นโดยใช้ลิงก์สั้น
    • ลงชื่อเข้าใช้ด้วย Google หรือ GitHub เพื่อบันทึกผลลัพธ์ของคุณในบัญชีสำหรับการใช้งานในภายหลัง

เลขฐานสิบหกคืออะไร?

เลขฐานสิบหก (หรือ hex) เป็นระบบเลขฐาน 16 ที่ทำให้การแสดงข้อมูลไบนารีง่ายขึ้น มันใช้สัญลักษณ์ 16 ตัว: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F แต่ละตัวเลขฐานสิบหกแทนลำดับไบนารี 4 บิต ทำให้ง่ายต่อการเขียนและอ่านตัวเลขไบนารี

ตัวอย่างเช่น:

  • ไบนารีเป็นเลขฐานสิบหก: 11010100 → D4
  • เลขฐานสิบหกเป็นไบนารี: FFFF3 → 11111111111111110011

ทำไมต้องใช้เลขฐานสิบหก?

เลขฐานสิบหกถูกใช้บ่อยในคอมพิวเตอร์และระบบดิจิทัลเพราะมันกระชับและอ่านง่ายกว่าไบนารี มันมักถูกใช้สำหรับที่อยู่หน่วยความจำ, รหัสสี, และการแสดงข้อมูลในชุดอักขระ ASCII หรือ Unicode

สำหรับรายละเอียดเพิ่มเติม โปรดดูที่ คู่มือที่เป็นประโยชน์นี้.

ตัวอย่าง

ก่อนเข้ารหัส

      
Hello, World!
      
    

หลังเข้ารหัส

      
48656c6c6f2c20576f726c6421
      
    

ถอดรหัส hex เป็นข้อความ: รูปแบบที่รองรับ

วาง hex ตามที่คุณเจอได้เลย ตัวถอดรหัสจะลบช่องว่าง จุลภาค โคลอน และคำนำหน้า 0x, \x หรือ % แล้วแปลงทุกสองหลักเป็นหนึ่งไบต์

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 cipher" แต่ hex เป็นการเข้ารหัสรูปแบบข้อมูล (encoding) ไม่ใช่การเข้ารหัสลับ (encryption) ทุกสองหลักคือหนึ่งไบต์ และใครก็อ่านกลับได้ด้วยตัวถอดรหัสแบบนี้ ถ้าต้องการซ่อนข้อมูลให้ใช้การเข้ารหัสจริง ถ้าต้องการตรวจว่าข้อมูลไม่ถูกแก้ ให้ใช้แฮชอย่าง SHA-256

วิธีถอดรหัส hex ด้วยมือ

แบ่ง hex เป็นคู่ แต่ละคู่คือตัวเลข 0 ถึง 255 หลักแรกนับหลักสิบหก หลักที่สองนับหลักหน่วย (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.