Skip to content
Developer

Hash Generator

Last updated: July 11, 2026

Generate cryptographic hash values (MD5, SHA-1, SHA-256, SHA-512) from any text input. All hashing is performed client-side using the Web Crypto API.

How to Use This Calculator

  1. Enter any text in the input area.
  2. Click "Generate Hashes" to produce four different hash values simultaneously.
  3. Review the MD5, SHA-1, SHA-256, and SHA-512 results.
  4. Click the "Copy" button next to any hash to copy it to your clipboard.

Formula

Each hash algorithm processes the input through a series of bitwise operations, logical functions, and modular arithmetic to produce a fixed-size output.
  • MD5: Produces a 128-bit (32 hex char) hash. Uses four rounds of 16 operations each.
  • SHA-1: Produces a 160-bit (40 hex char) hash. Uses 80 rounds with five 32-bit words.
  • SHA-256: Produces a 256-bit (64 hex char) hash. Part of the SHA-2 family.
  • SHA-512: Produces a 512-bit (128 hex char) hash. Also part of SHA-2 with 80 rounds.

All functions are one-way: given a hash, you cannot reverse-engineer the original input.

Examples

Example 1: Simple Hash

“Hello, World!” → MD5: 65a8e27d8879283831b664bd8b7f0ad4

Example 2: Password Storage

Websites store hashed passwords, not plaintext. When you log in, your password is hashed and compared to the stored hash. This protects credentials even if the database is compromised.

Example 3: File Integrity

SHA-256 checksums verify that downloaded files haven’t been tampered with. Git uses SHA-1 hashes to uniquely identify every commit, branch, and tag.

Frequently Asked Questions

Which hash algorithm should I use?

For security, use SHA-256 or SHA-512. MD5 and SHA-1 are deprecated for security purposes due to collision vulnerabilities, but MD5 is still useful for checksums and non-security fingerprinting.

Is hashing the same as encryption?

No. Hashing is one-way (irreversible). Encryption is two-way (can be decrypted with a key). You cannot “decrypt” a hash to get the original input back.

Is my data sent to a server?

No. All hashing is performed client-side using the Web Crypto API (SubtleCrypto). Your input never leaves your browser.

Can two different inputs produce the same hash?

In theory yes (called a collision), but for SHA-256 the probability is astronomically low — about 1 in 2⁻⁵⁵. This makes it practically impossible for real-world applications.

Disclaimer: All hashing is performed locally in your browser using the Web Crypto API. MD5 and SHA-1 should not be used for security-critical applications. Use SHA-256 or stronger for production use.