Hash Generator — Tutorial
What is a hash?
A hash is a fixed-size string generated from input data using a mathematical algorithm. Hashes are used for data integrity, password storage, file verification, and digital signatures. The same input always produces the same hash, but it's computationally infeasible to reverse the process.
Hash algorithms comparison
- MD5: 128-bit (32 hex chars). Fast but cryptographically broken. Use only for non-security purposes like checksums.
- SHA-1: 160-bit (40 hex chars). Legacy algorithm, deprecated for security uses since 2017.
- SHA-256: 256-bit (64 hex chars). Part of SHA-2 family. Secure and widely used for cryptographic applications.
- SHA-512: 512-bit (128 hex chars). More secure than SHA-256, better for long-term security.
Common use cases
- File integrity: Verify downloads haven't been corrupted
- Password storage: Store hashed passwords instead of plaintext
- Digital signatures: Sign document hashes instead of entire documents
- Blockchain: Bitcoin and other cryptocurrencies use SHA-256
- Data deduplication: Identify duplicate files by comparing hashes
Examples
Input: Hello World
- MD5:
b10a8db164e0754105b7a99be72e3fe5 - SHA-256:
a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e
Official documentation
How to use the Hash Generator
- Choose algorithm — Select MD5, SHA-1, SHA-256, or SHA-512 from the dropdown.
- Text input — Paste or type text, then click Hash text to get the hash.
- File input — Drop or select a file. The tool will hash the file contents locally.
- Output actions — Copy the hash or download it as a text file.
- History — Last 5 hashes are stored locally. Use Clear history to remove them.
Open the tool: Hash Generator
Privacy & limits
- All hashing is performed locally in your browser; no data is uploaded.
- Max file size: 10 MB.
Troubleshooting
- Hash mismatch: Ensure you use the same algorithm and input formatting as the source. Even a single character difference changes the hash completely.
- MD5/SHA-1 warnings: These algorithms have known vulnerabilities and shouldn't be used for password hashing or digital signatures.
- File encoding: Text files may have different line endings (CRLF vs LF) which affect the hash.
- Large files: Browsers may become unresponsive when hashing very large files (>100MB).
- Case sensitivity: Hash outputs are typically lowercase, but some systems use uppercase.
Security best practices
- Choose the right algorithm: Use SHA-256 or SHA-512 for security-critical applications
- Password hashing: Don't use plain hashes for passwords. Use bcrypt, scrypt, or Argon2 instead
- Salt your hashes: Add random data to prevent rainbow table attacks
- Verify integrity: Always compare hashes from trusted sources