SHA-256, SHA-384 & SHA-512 Hash Generator

Compute SHA-256, SHA-384 or SHA-512 of UTF-8 text or bytes with Web Crypto and get the digest in hex or Base64.

Options

Input

Ctrl + Enter to run

Result

Compute the SHA-256, SHA-384 or SHA-512 (SHA-2 family) hash of UTF-8 text or of hex/Base64 bytes with the browser’s Web Crypto API. Output can be hex or Base64.

A hash checks integrity: the same content always gives the same result and a tiny change gives a completely different one. It is not encryption: it cannot be “undone”, but it does not protect passwords on its own either.

How to use it

  1. Paste the text or bytes.
  2. Choose the algorithm, input format and output format.
  3. Press Run.

Example

Example input
abc
Result
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad

Limitations

  • MD5 and SHA-1 are not offered because they are not collision-resistant.
  • For passwords use a slow KDF (Argon2, scrypt, bcrypt or PBKDF2), not a plain hash.
  • A trailing space or line break changes the result.

FAQ

Why does my hash not match the terminal’s?
Usually a trailing newline: echo adds \n. Use echo -n or printf to compare.
SHA-256 of “abc”?
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad, the official FIPS 180 test vector.

Related tools

References