SHA-256 Online Generator

SHA-256 Online Generator

Image by rawpixel.com on Freepik

SHA-256 stands for Secure Hash Algorithm 256-bit and it’s used for generating a cryptographic hash.

If you’re not familiar with SHA-256, try out the online generator below. Just enter any message and click the “Convert to SHA-256” button.


Hash added to your clipboard. Simply press ⌘+V, CTRL+V to paste.


1
2
3
4
5
6
7
8
9
10
function hash(string) {
  const utf8 = new TextEncoder().encode(string);
  return crypto.subtle.digest("SHA-256", utf8).then((hashBuffer) => {
    const hashArray = Array.from(new Uint8Array(hashBuffer));
    const hashHex = hashArray
      .map((bytes) => bytes.toString(16).padStart(2, "0"))
      .join("");
    return hashHex;
  });
}
1
2
console.log(await hash("johndoe@yahoo.com"));
//e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855

comments powered by Disqus