What is Hash Generator (MD5/SHA)?
How It Works
Type or paste text into the input field and select a hash algorithm (or choose "All" to see all four at once). The hash is computed instantly as you type. You can copy any hash to your clipboard with one click. Toggle uppercase output if needed. The tool also displays known test vectors (hashes of an empty string) so you can verify correctness.
Formula
MD5: 128-bit (32 hex chars), RFC 1321 SHA-1: 160-bit (40 hex chars), FIPS 180-4 SHA-256: 256-bit (64 hex chars), FIPS 180-4 SHA-512: 512-bit (128 hex chars), FIPS 180-4
Formula Explained
Each algorithm processes the input through a series of bitwise operations, modular arithmetic, and compression functions. The input is padded, split into blocks, and processed through multiple rounds. MD5 uses 64 rounds with four different nonlinear functions. SHA-256 uses 64 rounds with different constants. SHA-512 uses 80 rounds with 64-bit words. The final state is the hash digest. These are one-way functions โ computationally infeasible to reverse.
Example
Input: "Hello, World!" MD5: 65a8e27d8879283831b664bd8b7f0ad4 SHA-1: 0a0a9f2a6772942557ab5355d76af442f8f65e01 SHA-256: dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986f SHA-512: 374d794a95cdcfd8b35993185fef9ba368f160d8daf432d08ba9f1ed1e5abe6cc69291e0fa2fe0006a52570ef18c19def4e617c33ce52ef0a6e5fbe318cb0387
Tips & Best Practices
- โUse SHA-256 for any security-critical hashing needs.
- โNever use raw hash functions for password storage โ use bcrypt or Argon2 instead.
- โCompare hashes to verify file integrity after downloads.
- โThe "All" mode lets you compare output sizes across algorithms at a glance.
- โHashes are deterministic โ the same input always produces the same output.
Common Use Cases
- โขVerifying file integrity after downloading software
- โขGenerating checksums for data deduplication
- โขComparing hash outputs during development and debugging
- โขLearning about cryptographic hash functions
- โขQuickly hashing strings for cache keys or identifiers