Cryptography

Hash Generator

Paste any text and generate a SHA-256, SHA-384 or SHA-512 hash using your browser's built-in Web Crypto API -- no data ever leaves your device.

Hashing happens locally using the Web Crypto API. Your text is never sent to a server.

What this tool does

This tool converts any text you provide into a fixed-length hexadecimal digest using SHA-256, SHA-384 or SHA-512 -- one-way cryptographic hash functions. The same input always produces the same digest, but even a tiny change to the input produces a completely different one.

Why security professionals use it

Hashes are used throughout security work: verifying that a file has not been tampered with, fingerprinting malware samples for threat intelligence sharing, comparing configuration or log snapshots, and generating unique identifiers for evidence in incident response. A quick, trustworthy, offline hash generator is a staple utility in a SOC analyst's toolkit.

How it works

When you click Generate, the tool encodes your text as UTF-8 bytes and passes them to the browser's native crypto.subtle.digest() function, which is part of the Web Crypto API implemented by the browser itself, not a JavaScript library. The resulting bytes are converted to a lowercase hexadecimal string for display.

Step by step

  1. 1Paste or type the text you want to hash into the input box.
  2. 2Choose SHA-256, SHA-384 or SHA-512 depending on your requirement.
  3. 3Click Generate hash to compute the digest.
  4. 4Copy the digest for comparison, documentation, or sharing with a colleague.

Practical examples

A developer publishing a release might hash the changelog text to give users a quick way to confirm they received the exact same content. A SOC analyst investigating a phishing email might hash a suspicious snippet of text extracted from the email body to compare it against known indicators of compromise shared by other analysts.

Common mistakes

  • Treating a hash as a way to hide or protect sensitive data -- hashes are for integrity checking, not confidentiality.
  • Using MD5 or SHA-1 for anything security-sensitive; both have known collision weaknesses.
  • Comparing hashes visually instead of programmatically, which is error-prone for long digests.
  • Forgetting that whitespace, casing and line endings change the hash even if the visible content looks identical.

Security considerations

Hashing is not encryption: a hash cannot be decrypted back into the original input, and this tool performs no such reversal. For password storage, use a purpose-built slow hashing algorithm (bcrypt, scrypt, Argon2) with a per-user salt rather than a general-purpose hash like SHA-256, which is fast enough that attackers can brute-force short inputs at scale. For file or message integrity, prefer SHA-256 or stronger over MD5/SHA-1 wherever possible.

Frequently asked questions

Is hashing the same as encryption?

No. Encryption is reversible with the right key, so ciphertext can be turned back into plaintext. Hashing is one-way: a good hash function makes it computationally infeasible to recover the original input from the digest.

Why not just use MD5 or SHA-1?

Both have known collision weaknesses, meaning attackers can construct two different inputs that produce the same hash. They are still fine for basic checksums like detecting accidental file corruption, but should not be relied on for security purposes such as password storage or digital signatures.

Which algorithm should I use?

SHA-256 is a solid general-purpose default used throughout TLS, code signing and blockchain systems. SHA-384 and SHA-512 provide larger digests and are sometimes preferred for higher-assurance use cases or better performance on 64-bit hardware.

Can I use this to hash passwords for storage?

No. Password storage should use a slow, salted algorithm specifically designed for that purpose, such as bcrypt, scrypt or Argon2. General-purpose hashes like SHA-256 are fast, which makes them unsuitable for password storage because attackers can brute-force them very quickly.