SHA Generator

Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes and HMACs

Calculate SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text or files at once with your browser's built-in cryptography, create HMAC-SHA signatures with a secret key, and verify checksums.
Try an example:

Output will appear here...

About SHA Generator

How it works

  1. Text is encoded as UTF-8 bytes (or a file is read byte for byte) in your browser.
  2. The Web Crypto API computes all four SHA hashes - the same implementation browsers use for HTTPS.
  3. Add a secret key to get HMAC-SHA signatures, as used for webhooks and API authentication.
  4. Paste an expected value to check which hash it matches.

What you need

  • Some text, or a file up to 100 MB.

Tips

  • SHA-256 is the standard choice: used in TLS certificates, Git, Bitcoin and software downloads.
  • SHA-512 is often faster than SHA-256 on 64-bit computers.
  • Verifying a webhook? Hash the raw request body exactly as received, with the secret from your provider.

Limitations

  • SHA-1 is broken (collisions have been demonstrated since 2017) - use it only where an old system requires it.
  • SHA hashes are too fast for storing passwords; use bcrypt.
  • SHA-3 is not available in browsers natively, so it is not included.

Runs in your browser. Everything runs in your browser; text, files and keys are never uploaded.

Frequently asked questions

What do the numbers in SHA-256 and SHA-512 mean?+

The length of the hash in bits. SHA-256 gives 256 bits (64 hex characters), SHA-512 gives 512 bits (128 hex characters). Longer hashes are harder to collide.

Is SHA-256 secure?+

Yes. No practical attacks are known against SHA-256, SHA-384 or SHA-512. It is used everywhere from HTTPS certificates to cryptocurrencies.

Hex or Base64?+

They are the same bytes written differently. Hex uses 0-9 and a-f; Base64 is shorter and common in HTTP headers and JSON (for example Subresource Integrity values).

Why is my hash different from another tool's?+

Usually invisible differences in the input: a trailing newline, spaces, or Windows (CRLF) vs Unix (LF) line endings. Hashing a file avoids copy-paste differences.