Back to Home

Hash Generator

Generate cryptographic hashes and HMAC signatures

Input Text

Standard Hashes

MD5
Enter text to generate hash
SHA-1
Enter text to generate hash
SHA-256
Enter text to generate hash
SHA-512
Enter text to generate hash

HMAC (Hash-based Message Authentication Code)

HMAC-SHA256
Enter text to generate hash

📖 Hash Functions

  • MD5: 128-bit hash. Broken for collision resistance; use only for non-security checksums (e.g. spotting accidental file corruption).
  • SHA-1: 160-bit hash. Also broken for collision resistance (practical collisions shown in 2017); use only for non-security checksums.
  • SHA-256: 256-bit SHA-2 hash. Good for integrity checks and digital signatures.
  • SHA-512: 512-bit SHA-2 hash. Also good for integrity checks; a longer digest, not a substitute for a password hash.
  • HMAC: Keyed-hash for authentication

💡 Use Cases

  • • File integrity checking (SHA-256 / SHA-512)
  • • Digital signatures
  • • API authentication (HMAC)
  • • Data deduplication
  • • Blockchain and cryptocurrencies

Storing passwords? Do not use any of the hashes on this page. Fast hashes such as MD5 and SHA-256/512 can be brute-forced quickly. Use a dedicated, salted, slow password-hashing function: bcrypt, scrypt or Argon2 (OWASP Password Storage Cheat Sheet).

Overview

The Hash Generator computes MD5, SHA-1, SHA-256 and SHA-512 digests of any text as you type, plus an HMAC-SHA256 signature when you supply a secret key. Developers use it to verify checksums, test API signatures, compare data and learn how hash functions behave.

A hash function turns input of any length into a fixed-length fingerprint: 128 bits for MD5, 160 for SHA-1, 256 for SHA-256 and 512 for SHA-512, shown here as lowercase hexadecimal. Changing a single character produces a completely different result. Your text is encoded as UTF-8 and hashed entirely in your browser using the Web Crypto API (MD5 is computed locally because Web Crypto does not include it), so nothing is sent to a server.

MD5 and SHA-1 are no longer collision-resistant and should not be used for security. SHA-256 and SHA-512 belong to the SHA-2 family standardized by NIST in FIPS 180-4. None of these fast hashes are suitable for storing passwords; use bcrypt, scrypt or Argon2 for that.

How to Use

  1. Type or paste your text into the Input Text box. The MD5, SHA-1, SHA-256 and SHA-512 results appear immediately under Standard Hashes.
  2. To create a keyed signature, enter a value in the Secret Key field under HMAC. The HMAC-SHA256 result updates whenever the text or key changes.
  3. Click the copy icon on any result card to copy that hash to your clipboard.
  4. To verify a download or message, compare the hash shown here with the one published by the source. Every character must match.

Frequently Asked Questions

What is the SHA-256 hash of "hello"?

Typing hello (lowercase, no trailing space or newline) gives the SHA-256 hash 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824. The MD5 of the same text is 5d41402abc4b2a76b9719d911017c592. Add one space or capitalize the H and both results change completely. This sensitivity is why hashes are good at detecting even tiny changes to data.

Can a hash be reversed or decrypted?

No. Hashing is a one-way function, not encryption, so there is no key that turns a hash back into the original text. However, short or common inputs can be found by guessing: attackers hash millions of likely words per second and compare results, and precomputed lookup tables exist for popular strings. That is why a hash of a simple word or password offers little protection on its own.

Is MD5 or SHA-1 still safe to use?

Not for security. Researchers have produced practical MD5 collisions for years, and a SHA-1 collision was publicly demonstrated in 2017, meaning two different inputs can be crafted with the same hash. NIST has deprecated SHA-1 for digital signatures. Both are still fine for non-security tasks like spotting accidental file corruption or deduplicating data, but use SHA-256 or SHA-512 for anything an attacker might target.

What is HMAC and when should I use it?

HMAC (Hash-based Message Authentication Code, defined in RFC 2104) combines a secret key with the message before hashing. Only someone who knows the key can produce the same result, so it proves both integrity and authenticity. APIs and webhook providers commonly sign requests with HMAC-SHA256. For example, the message hello with the key secret produces 88aab3ede8d3adf94d26ab90d3bafd4a2083070c3bcce9c014ee04a443847c0b.

Why does my hash differ from the one another tool gives?

Usually the input is not exactly the same. Common causes are a trailing newline (the echo command adds one unless you use echo -n), different line endings between Windows and macOS or Linux, extra spaces, or a different text encoding. This page hashes the exact characters in the box as UTF-8. Also check that both tools output hexadecimal rather than Base64.

Should I use SHA-256 to store passwords?

No. SHA-256 and SHA-512 are designed to be fast, which lets attackers test billions of guesses on modern hardware. Password storage needs a deliberately slow, salted algorithm such as Argon2, scrypt or bcrypt, as recommended by the OWASP Password Storage Cheat Sheet. Use this tool for checksums, signatures and testing, not for protecting user passwords.