แฮช/การเข้ารหัส
Hash Generator
คำนวณแฮชของข้อความหรือไฟล์ด้วย 13 อัลกอริทึมพร้อมกัน: MD5, SHA-1, SHA-256, SHA-384, SHA-512, SHA3-256, SHA3-512, RIPEMD-160, BLAKE2b, BLAKE2s, BLAKE3, CRC32 และ Adler-32
A hash function turns arbitrary data into a fixed-length digest that's unique to that content — changing even one letter of the input completely changes the output. This tool computes a hash of text or a file using 13 popular algorithms at once, right in your browser.
Which algorithm to pick
- MD5 and SHA-1 — cryptographically broken (practical collision attacks exist) but still used for file-integrity checks where an attack is unlikely.
- SHA-256 / SHA-512 (the SHA-2 family) — the standard for signatures, certificates, and blockchains; no known practical attacks as of 2026.
- SHA3 and BLAKE2/BLAKE3 — newer designs; BLAKE3 in particular is very fast and parallelizes well on large files.
- CRC32 / Adler-32 — not cryptographic, meant only for detecting accidental corruption (e.g. in ZIP files), not for defending against deliberate tampering.
Common uses
- Verifying that a downloaded file isn't corrupted or tampered with, by comparing its hash to the one published by the developer.
- Generating a content-based cache key or identifier.
- Quickly comparing two large files or texts without a byte-by-byte diff.
Things to keep in mind
Hashing isn't encryption — it's one-way, so you can't recover the original data from a hash.
Plain fast hashes (MD5, SHA-256) are unsuitable for passwords — use a dedicated slow algorithm like bcrypt, Argon2, or PBKDF2 instead.
บทความเกี่ยวกับเครื่องมือนี้: Hash Generator: MD5, SHA-1 และ SHA-256 ต่างกันอย่างไร
คำถามที่พบบ่อย
ควรใช้อัลกอริทึมแฮชแบบไหน?
สำหรับเช็คซัมทั่วไป (ตรวจสอบความถูกต้องของไฟล์ ลดข้อมูลซ้ำ) SHA-256 เป็นค่าเริ่มต้นที่ทันสมัยและมั่นคง หลีกเลี่ยง MD5 และ SHA-1 สำหรับงานที่เกี่ยวข้องกับความปลอดภัย เพราะทั้งคู่ถูกโจมตีแบบชนกันโดยเจตนาได้แล้ว แม้จะยังใช้ได้กับการตรวจสอบเร็ว ๆ ที่ไม่มีฝ่ายตรงข้าม
แฮชสามารถย้อนกลับเป็นข้อมูลต้นฉบับได้หรือไม่?
ไม่ได้ ฟังก์ชันแฮชเชิงรหัสลับเป็นแบบทางเดียว คุณตรวจสอบว่าตรงกันได้เพียงแค่แฮชข้อมูลอื่นแล้วเทียบผลลัพธ์เท่านั้น ไม่สามารถกู้ข้อมูลต้นฉบับจากแฮชได้
เครื่องมือนี้อัปโหลดไฟล์หรือข้อความของฉันเพื่อคำนวณแฮชหรือไม่?
ไม่ การแฮชทั้งหมดทำงานในเบราว์เซอร์ของคุณผ่าน Web Crypto API ไม่มีการส่งข้อมูลไปยังเซิร์ฟเวอร์ จึงใช้งานได้แม้ออฟไลน์
เหตุใดจึงต้องมี SHA-3 ในเมื่อ SHA-2 ยังคงปลอดภัยอยู่?
SHA-3 ถูกเลือกเป็น "ประกันภัย" เผื่อกรณีที่ในอนาคตพบช่องโหว่ใน SHA-2 — มันสร้างขึ้นจากโครงสร้างภายในที่แตกต่างไปโดยพื้นฐาน (Keccak) เนื่องจากยังไม่พบการโจมตีเชิงปฏิบัติต่อ SHA-2 SHA-256 จึงยังคงเป็นค่ามาตรฐานเริ่มต้น ส่วน SHA-3 ถูกนำไปใช้เฉพาะจุด
แฮชที่ยาวกว่าหมายความว่าปลอดภัยกว่าโดยอัตโนมัติหรือไม่?
ไม่เสมอไป ความยาวของผลลัพธ์สำคัญ แต่ความแข็งแกร่งของอัลกอริทึมขึ้นอยู่กับโครงสร้างภายในเป็นหลัก — SHA-1 ที่มีผลลัพธ์ 160 บิตยังเสี่ยงต่อการชนกัน (collision) ในขณะที่อัลกอริทึมสมัยใหม่ที่ออกแบบมาดีแม้จะมีบิตสั้นกว่าก็อาจแข็งแกร่งกว่าได้