SHA-256 Hash Generator
Generate a secure SHA-256 hash of any input text.
Enter text above to see its hash.
How the page computes SHA-256
Your text is converted to UTF-8 bytes and passed to the browser's Web Crypto function crypto.subtle.digest("SHA-256"). The digest is shown as 64 lowercase hex characters and recalculates on each keystroke.
| Input | SHA-256 |
|---|---|
| (empty) | e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 |
hello | 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 |
To check the page against your own machine, run printf hello | sha256sum on Linux, printf hello | shasum -a 256 on macOS, or in PowerShell Get-FileHash on a file that contains only those five letters.
Hashing JSON and other structured data
SHA-256 works on exact bytes, not on meaning. Two JSON documents that a parser treats as equal can hash differently:
{"a":1,"b":2}gives43258cff…{"b":2,"a":1}gives3fb75453…- The first object pretty-printed with two-space indents gives
c81ded0f…
If two services need to agree on a hash of the same data, they must agree on the exact serialisation first: key order, spacing, number format and line endings. When you're debugging a mismatch, copy the exact string each side hashed from its logs and paste each one here, rather than re-typing the data.
When the value you need isn't plain SHA-256
- Webhook and API signatures: these are usually HMAC-SHA256, which mixes a secret key into the calculation. A plain SHA-256 of the payload, which is what this page produces, will never match an HMAC signature, even with the right payload.
- Base64 instead of hex: some formats, including subresource integrity attributes, expect the digest in Base64.
helloin Base64 form isLPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=. This page shows hex only, so convert the bytes with a tool or a line of code, not by Base64-encoding the hex text. - Files: the box takes text. For a downloaded file's checksum, run the command-line tools above on the file itself.
Frequently asked questions
Why does the hash change when I add a line break at the end?+
The line break is a byte like any other. hello followed by one line feed gives 5891b5b5… instead of 2cf24dba…, so check for trailing newlines when copying text from files or terminals.
Is uppercase hex output the same hash?+
Yes. Hex digits a to f in capitals represent the same bytes, so compare hashes case-insensitively or lowercase both sides.
Can two different texts have the same SHA-256?+
In principle, yes, because there are more possible inputs than outputs. For everyday checks, such as whether two strings are identical, a match is treated as proof.
Does the page keep the text I hash?+
No. The text stays in the box until you leave and is not sent anywhere; the hashing is done by your browser.
Embed this tool on your website
Free to use on blogs, school sites and intranets. Paste this code into your page's HTML; please keep the credit line.
<iframe src="https://utilityapp.lat/embed/dev/sha256-hash-generator" title="SHA-256 Hash Generator" width="100%" height="600" style="border:0;max-width:760px" loading="lazy"></iframe> <p style="font-size:13px"><a href="https://utilityapp.lat/dev/sha256-hash-generator">SHA-256 Hash Generator</a> by UtilityApp</p>