Hash Generator
Generate MD5, SHA-1, SHA-256 hash values.
Overview
Generate hash values including MD5, SHA-1, SHA-256, and SHA-512 for input text. Used for data integrity verification, file checksum validation, and password storage.
Formula
A hash function is a one-way function that converts arbitrary-length input into fixed-length output. MD5: 128-bit (32 hex chars), Merkle-Damgard construction. SHA-1: 160-bit (40 hex chars). SHA-256: 256-bit (64 hex chars), SHA-2 family, splits the message into 512-bit blocks and applies 64 rounds of compression. SHA-512: 512-bit (128 hex chars). The same input always produces the same hash, and reversing a hash to find the original is computationally infeasible.
How to Use
- 1Select a hash algorithm (MD5, SHA-1, SHA-256, SHA-512).
- 2Enter the text.
- 3The generated hash value is displayed instantly.
- 4Copy the hash value.
Tips
- ✔MD5 and SHA-1 have known collision vulnerabilities; use SHA-256 or above for security purposes.
- ✔For password storage, use key-stretching algorithms like bcrypt, scrypt, or Argon2 instead of plain hashes.
- ✔Compare checksums provided with file downloads to verify file integrity.
- ✔Adding a salt to the input prevents rainbow table attacks.
FAQ
Q. What is the difference between hashing and encryption?
Hashing is a one-way function; the original cannot be recovered. Encryption is two-way and uses a key to restore the original data. Hashing is used for integrity verification, while encryption is used to ensure confidentiality.
Q. Why is MD5 not secure?
Collision attacks (where two different inputs produce the same hash) have been proven practical for MD5. It can still be used for checksums or non-security purposes, but should not be used for digital signatures, certificates, or other security applications.
Q. What is a hash collision?
A hash collision occurs when two different inputs produce the same hash value. Theoretically, collisions exist for all hash functions (pigeonhole principle), but a good hash function makes finding collisions computationally very difficult.
Related Calculators
Color Converter
Convert between HEX, RGB, and HSL color codes.
Unix Timestamp Converter
Convert between Unix timestamps and dates/times.
Base64 Encoder/Decoder
Encode and decode text in Base64 format.
JSON Formatter
Format or minify JSON data for readability.
URL Encoder/Decoder
Encode and decode URL strings.
Regex Tester
Test regular expressions and view match results.