Free SHA-256 Hash Generator

Type text or choose a file to get its SHA-256 hash, then paste a published checksum to check that they match. HMAC-SHA256 with your own key, hex or Base64 output and files of any size are supported. Hashing runs in your browser, so your text and files are never uploaded.

Input

Text is hashed as UTF-8, exactly as typed. Line breaks count, so "hello" and "hello" followed by Enter give different hashes.

Or hash a file

Any file type and size. The file is read in chunks on your device and never uploaded. Large files take roughly 15-30 seconds per gigabyte on a typical computer and longer on phones; a progress bar shows how far it has got.

Compare Hash

Checked as you paste. Upper or lower case, extra spaces, Base64, and checksum lines such as "hashย ย file.iso" are all accepted.

About SHA-256 Hash

SHA-256 (Secure Hash Algorithm 256-bit) is a cryptographic hash function from the SHA-2 family, standardised by NIST in FIPS 180-4. It produces a 256-bit (32-byte) value, shown as a 64-character hexadecimal number.

Common Uses:

  • Verifying downloads against a published SHA-256 checksum
  • TLS certificates and code-signing signatures
  • Bitcoin and other blockchains (block hashes and transaction IDs)
  • Content addressing, for example Docker image digests
  • HMAC-SHA256 signatures for APIs, webhooks and JWTs (HS256)

HMAC-SHA256: HMAC (Hash-based Message Authentication Code) combines SHA-256 with a secret key, so only someone with the key can produce or check the value. Turn it on above, enter the key, and compare the result with the signature you received. Many services send the signature in hex, some in Base64; choose the matching output format. A JWT (HS256) signature is Base64url, so paste it into Compare Hash instead.

Security: No practical collision or preimage attack on SHA-256 is known. For storing passwords, use a slow password hash such as bcrypt, scrypt or Argon2 instead of plain SHA-256.

Summary: generate a SHA-256 hash, free and private

A SHA-256 hash generator turns any text or file into a 256-bit fingerprint, written as 64 hexadecimal characters. To generate a SHA-256 hash free and privately, type or paste text into Text Input above, or click Choose File, and the hash appears under SHA-256. The hashing runs in your browser; nothing is uploaded, and you can check that in the Network tab of DevTools.

SHA-256 belongs to the SHA-2 family, which NIST specifies in FIPS 180-4. The same input always gives the same hash and any change gives a different one, so a published checksum lets you confirm a download is intact. Tick HMAC-SHA-256 to mix in a secret key and produce a signature instead. The older MD5 hash generator is there for legacy checksums.

Table of Use: inputs and their SHA-256 values

InputResultWhat it shows
hello2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824The standard example
Hello185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969A capital letter changes the whole hash
hello followed by Enter5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03The line break is part of the input
abcba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015adThe first test vector in the NIST examples
The quick brown fox jumps over the lazy dogd7a8fbb307d7809469ca9abcb0082e4f8d5651e46d3cdb762d02d0bf37c9e592A common test sentence
hello, with Output format set to Base64LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ=The same 32 bytes written in Base64
HMAC, key "key", the fox sentencef7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8Tick HMAC-SHA-256 and enter the key
HMAC, key "secret", message "hello"88aab3ede8d3adf94d26ab90d3bafd4a2083070c3bcce9c014ee04a443847c0bSame message, different result from the plain hash

HMAC-SHA256: a SHA-256 hash with a secret key

HMAC is a keyed hash: only someone who knows the secret key can produce or check the value. It is defined in RFC 2104 as HMAC(K, m) = SHA-256((Kโ€ฒ โŠ• opad) โˆฅ SHA-256((Kโ€ฒ โŠ• ipad) โˆฅ m)), where Kโ€ฒ is the key, hashed first if it is longer than 64 bytes, then padded with zeros to the 64-byte block size. APIs, webhooks and JWTs that use HS256 sign their messages this way. Webhooks and APIs usually send the signature in hex or Base64, so pick the Output format that matches. A JWT signature is Base64url without padding, which Output format does not offer; paste it into Compare Hash, which accepts it.

SHA-256 compared with MD5

FeatureSHA-256MD5
Hash length256 bits, 64 hex characters128 bits, 32 hex characters
Practical collision attacksNone knownKnown since 2004
Published asFIPS 180-4 from NISTRFC 1321 from the IETF
Keyed mode (HMAC) on this toolYesNo
Good forDownload checks, signatures, API signingLegacy checksums, duplicate detection

Features

  • Text as UTF-8, exactly as typed. Line breaks count, and the hash updates as you type. The hashing code loads the first time you type or choose a file.
  • Files of any type and size. Files are read in 4 MB chunks, with a progress bar and a Cancel button.
  • HMAC-SHA-256 (keyed hash). Enter the Secret key as Text (UTF-8) or Hex bytes; an invalid hex key gets an error. It works on files as well as text.
  • Hex or Base64. Output format offers Hex (64 characters) or Base64, and Uppercase hex applies to hex only.
  • Compare Hash. Accepts the expected value in any case, with extra spaces, in Base64 or URL-safe Base64, or as a whole sha256sum or BSD-style line.
  • Checksum download. A plain file digest downloads as a line in lowercase hex named after the file, such as notes.zip.sha256, which sha256sum -c can check. Text hashes download as sha256-hash.txt and HMACs as hmac-sha256-hash.txt.
  • Recent Hashes. The last 10 entries stay on the page while it is open, and each HMAC entry remembers its key in memory so clicking it restores the key. They are cleared when you leave or reload the page, not by Reset.

To re-encode a digest, the Base64 encoder and Base64 decoder are close by, and the hex to binary converter shows a digest as bits. If two hashes of supposedly identical text differ, the text diff tool shows what changed. When you need reversible protection instead of a hash, use the text encryption tool.

How to Use the SHA-256 Hash Generator

  1. Type or paste text into Text Input, or click Choose File and pick a file. A file replaces the text, and typing replaces a file.
  2. Read the hash in the result box. Under Output format choose Hex or Base64, and tick Uppercase hex if you need capitals.
  3. For an HMAC, tick HMAC-SHA-256 (keyed hash), enter the Secret key and choose its Key format.
  4. To verify, paste the expected value into Compare Hash and read the green or red message.
  5. Click Copy or Download, or click a Recent Hashes entry to show it again. Reset clears the text, file, Compare Hash and HMAC key; Recent Hashes, which remember the key used for each HMAC, stay until you leave or reload the page.

Who Can Use a SHA-256 Hash Generator

Administrators and careful users verify ISO images, installers and archives against the publisher's checksum. Developers build and test API request signatures and webhook checks, often alongside the JSON formatter for the payload, and can make random test secrets with the password generator. Anyone working with content-addressed systems, such as container image digests that begin with sha256:, can compare values here, and students use it to see the avalanche effect first hand. The file hash calculator is another way to hash a file.

FAQs

How do I generate a SHA-256 hash?

Type or paste text into Text Input and its SHA-256 hash appears as you type, as 64 hexadecimal characters. To hash a file, click Choose File: the file is read in chunks on your device and the hash appears when it finishes, with a progress bar for large files. Click Copy to copy it, or Download to save it.

How do I verify a download with a SHA-256 checksum?

Click Choose File and select the downloaded file, then paste the checksum published by the software provider into Compare Hash. The tool shows "Hashes match." or "Hashes do not match." straight away. It accepts upper or lower case, extra spaces, Base64 and whole lines from sha256sum or BSD-style checksum files. Take the checksum from the project's official site, not from the mirror that served the file.

Why is my hash different from the one sha256sum gives?

The input differs, most often by a trailing line break. echo "hello" | sha256sum hashes hello plus a newline and prints 5891b5b522d5df086d0ff0b110fbd9d21bb4fc7163af34d08286a2e846f6be03, while echo -n "hello" gives 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824, the value this tool shows. Hash a file with Choose File to match sha256sum exactly.

How do I create an HMAC-SHA256 signature online?

Tick HMAC-SHA-256 (keyed hash), type the Secret key, and set Key format to Text (UTF-8) or Hex bytes. Then type the message or choose a file. Pick Hex or Base64 output to match the service you are working with; a JWT signature is Base64url instead, which Compare Hash accepts. With the key "key" and the message "The quick brown fox jumps over the lazy dog", the result is f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8.

Can I check a webhook or JWT signature with this tool?

Yes, if the signature is HMAC-SHA256. Paste the exact signed text, such as the raw webhook body or the header.payload part of a JWT, enter the shared secret, and paste the received signature into Compare Hash. Hex, Base64 and URL-safe Base64 are all accepted. The text must match byte for byte, including line breaks.

Is SHA-256 secure, and can it be reversed?

SHA-256 is a one-way function, so the input cannot be calculated from the hash, and no practical collision or preimage attack on it is known. Common inputs can still be guessed by hashing candidates, so passwords need a slow, salted hash. As of October 2026 the OWASP Password Storage Cheat Sheet recommends Argon2id first, and 600,000 iterations for PBKDF2-HMAC-SHA256.

What is the difference between SHA-256 and MD5?

SHA-256 gives a 256-bit hash of 64 hexadecimal characters; MD5 gives a 128-bit hash of 32. MD5 collisions can be created on purpose, while no practical collision attack on SHA-256 is known, so SHA-256 is the right choice wherever someone could tamper with the data. MD5 remains useful for legacy checksums and for non-security jobs such as finding duplicate files.

Are my files and secret key uploaded anywhere?

No. Hashing runs in your browser: files are read in 4 MB pieces on your device and there is no size limit. The secret key stays in the open tab and is never stored or sent anywhere. Recent Hashes lists the last 10 entries, remembering the key used for each HMAC, until you leave or reload the page. In the Network tab of DevTools you will see no request carrying your text, file or key.