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

AlgorithmOutput SizeSecurityUse Case
MD5128 bits (32 hex)BrokenLegacy, checksums only
SHA-1160 bits (40 hex)DeprecatedLegacy systems
SHA-256256 bits (64 hex)SecureGeneral purpose (recommended)
SHA-384384 bits (96 hex)SecureHigh security
SHA-512512 bits (128 hex)SecureMaximum 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