Hash Generator
Generate cryptographic hashes (MD5, SHA-1, SHA-256, SHA-384, SHA-512) from text. Perfect for checksums, data integrity, and password hashing.
Security Warning
MD5 and SHA-1 are cryptographically broken and should not be used for security purposes. For password hashing, use bcrypt, scrypt, or argon2. For general cryptographic use, prefer SHA-256 or higher.
What is a Hash Function?
A hash function is a mathematical algorithm that converts input data of any size into a fixed-size string of bytes. The output, called a hash or digest, is unique to each unique input and cannot be reversed to obtain the original data.
Hash Algorithm Comparison
| Algorithm | Output Size | Security | Use Case |
|---|---|---|---|
| MD5 | 128 bits (32 hex) | Broken | Legacy, checksums only |
| SHA-1 | 160 bits (40 hex) | Deprecated | Legacy systems |
| SHA-256 | 256 bits (64 hex) | Secure | General purpose (recommended) |
| SHA-384 | 384 bits (96 hex) | Secure | High security |
| SHA-512 | 512 bits (128 hex) | Secure | Maximum security |
Common Use Cases
- File Integrity: Verify downloaded files haven't been corrupted
- Password Storage: Store password hashes (use bcrypt/argon2 for production)
- Data Deduplication: Identify duplicate content
- Digital Signatures: Create unique identifiers for documents
- Blockchain: Core component of cryptocurrencies
- Caching: Generate cache keys from content
Security Recommendations
- Don't use MD5 or SHA-1 for security-critical applications
- Use SHA-256 or higher for general cryptographic purposes
- For passwords: Use bcrypt, scrypt, or argon2 (not plain SHA)
- Add salt: Always use unique salts for password hashing
- Multiple rounds: Use key stretching for password hashing
Important Notes
- Hash functions are one-way - you cannot reverse a hash to get the original data
- The same input always produces the same hash (deterministic)
- Even a tiny change in input produces a completely different hash (avalanche effect)
- All hashing happens locally in your browser - no data is sent to servers