SHA-256 Hash Generator
Make a SHA-256 hash of any text or file, check a download against its checksum, and sign messages with HMAC-SHA256. Everything runs in your browser.
All SHA hashes of this text
🔒 Everything runs in your browser. Your text, keys and files are never uploaded.
Free SHA-256 Hash Generator
This free SHA-256 hash generator turns any text or file into its SHA-256 hash, the 64-character fingerprint used to check downloads, store data safely and sign messages. Type or paste text and the hash appears as you type. Drop in files of any size to get their checksums, compare them with the value from a download page, or check a whole checksum file at once. You can also make HMAC-SHA256 signatures with a secret key. Everything runs in your browser, so your text, keys and files are never uploaded.
What is SHA-256?
SHA-256 is a cryptographic hash function from the SHA-2 family, published by the US National Institute of Standards and Technology (NIST). It reads data of any length and produces a fixed 256-bit result, written as 64 hexadecimal characters. For example, the SHA-256 hash of the word hello is:
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
A good hash has three properties that make it useful:
- Same input, same hash. Hash the same bytes anywhere, on any device, and you always get the same result.
- A tiny change changes everything. Change one letter, one space or one line break and the hash looks completely different.
- One way only. You can’t work out the original text from its hash. The only way is to guess inputs and hash each guess.
How to create a SHA-256 hash of text
- Make sure SHA-256 is selected under Algorithm.
- Type or paste your text into the Text to hash box. The hash appears instantly below it.
- Choose a Hash format: lowercase hex, UPPERCASE hex or Base64.
- Click Copy hash.
The same text in SHA-1, SHA-224, SHA-384 and SHA-512 is listed under All SHA hashes of this text, each with its own Copy button.
How to check a file’s SHA-256 checksum
- Open the Files tab.
- Drop one or more files onto the box, or click it to choose them. Large files are read in pieces, so even multi-gigabyte downloads work, and a progress bar shows how far along each file is.
- Paste the checksum from the download page into Expected hash. A green Matches the expected hash label means your file is complete and unchanged. A red label means it doesn’t match.
- Click Download checksum file to save the hashes, or Copy all to copy them.
Got a checksum file such as SHA256SUMS or file.iso.sha256? Drop it together with the files it lists. Each file is checked against its line in the list, and the tool picks the right SHA algorithm from the length of the hashes.
How to make an HMAC-SHA256 signature
- Turn on Use a secret key (HMAC).
- Enter the key in Secret key. If your key is given as hex or Base64, set Key is to match so the right bytes are used.
- Type the message in Text to hash. The HMAC-SHA256 signature appears below it.
HMAC (hash-based message authentication code, RFC 2104) mixes a secret key into the hash. Only someone who has the same key can make the same signature, which is how many APIs and webhooks prove that a request is genuine.
Features
Live hashing as you type
The hash updates with every keystroke, and the line under it shows the length in characters and bits and how many bytes were hashed.
Hash text, hex or Base64 input
By default the tool hashes the UTF-8 bytes of your text, so accented letters and emoji work. Set Input is to Hex bytes or Base64 to hash raw bytes instead, for example a key or a value copied from a log.
Hash each line separately
Turn on Hash each line separately to get one hash per line, in the same order, for lists of IDs, emails or passwords. Copy the list or download it as a text file.
Compare with a hash, and find out why it doesn’t match
Paste a hash into Compare with a hash to check it. If it doesn’t match, the tool looks for the usual reasons: a line break at the end of the text, extra spaces, Windows line breaks, a hash made with a different SHA algorithm, or an HMAC made without a key. It tells you which one it is, and often fixes it in one click.
Files of any size, several at once
Files are hashed one after another, in pieces, without loading the whole file into memory. Each file gets its own hash, Copy button and match label.
Checksum files in and out
Download checksum file saves the hashes in the common format of one line per file: the hash, two spaces and the file name. The same format, and the SHA256 (file) = hash style, can be dropped back in to verify files later.
SHA-256 vs. other SHA hashes
All five tools in the SHA family work the same way and differ in the length of the result:
- SHA-1 gives a 160-bit (40-character) hash. It is no longer safe against attackers, but it is still used for checksums and in older systems.
- SHA-224 is a shorter, 224-bit (56-character) version of SHA-256.
- SHA-256 gives a 256-bit (64-character) hash. It is the most widely used today, for software downloads, digital certificates and blockchains.
- SHA-384 is a shorter, 384-bit (96-character) version of SHA-512.
- SHA-512 gives a 512-bit (128-character) hash, the longest in the family.
Switch between them at any time with the Algorithm buttons. Your text and files are hashed again right away.
Why doesn’t my SHA-256 hash match?
A hash depends on every byte of the input, so things you can’t see make a difference:
- A line break at the end. Typing
echo helloin a terminal hashes “hello” plus a line break. Useecho -n helloto leave it out. - Spaces at the start or end of the text.
- Windows line breaks (CRLF) instead of plain line breaks (LF).
- Different capital letters, or a character that only looks the same, such as a curly quote instead of a straight one.
- A different algorithm, such as a SHA-1 or MD5 hash compared with SHA-256.
When you paste the expected hash into Compare with a hash, the tool checks these for you. Hex hashes are compared without regard to upper or lower case.
Is SHA-256 encryption?
No. Hashing is one way: there is no key and no way to turn a hash back into the original text. Encryption is two way: with the right key, encrypted data can be decrypted. That makes hashes good for checking that data hasn’t changed, but not for keeping data you need to read again.
For storing passwords, a plain SHA-256 hash is too fast to be safe on its own, because attackers can test billions of guesses per second. Password storage should use a slow, salted method made for passwords.
Is it private?
Yes. The SHA-256 hash generator runs entirely in your web browser. Your text, secret keys and files are hashed on your own device and are never sent to our server or anyone else. The tool remembers a few settings, such as the hash format, but it never saves your text, keys or files.
Frequently asked questions
Is this SHA-256 hash generator free?
Yes. It’s completely free, with no sign-up and no limit on how much text or how many files you hash.
Can I hash large files?
Yes. Files are read in 4 MB pieces, so files of several gigabytes work without filling up your device’s memory. A progress bar shows how far along each file is.
How do I verify a downloaded file with SHA-256?
Open the Files tab, drop the downloaded file and paste the checksum from the download page into Expected hash. If the label turns green, the file is complete and hasn’t been changed. If a checksum file is offered, such as SHA256SUMS, drop it in together with the file instead.
Can a SHA-256 hash be reversed or decrypted?
No. SHA-256 is a one-way function, so the original text can’t be calculated from the hash. Short or common inputs can still be found by guessing and comparing, which is why passwords need a salted, slow password-hashing method.
Why is my hash different from the one I expected?
Usually because the input isn’t exactly the same: a line break at the end, extra spaces, Windows line breaks or a different algorithm. Paste the expected hash into Compare with a hash and the tool tells you which one it is.
What is HMAC-SHA256?
HMAC-SHA256 is a signature made by hashing a message together with a secret key. It proves that the message came from someone who knows the key and wasn’t changed. Turn on Use a secret key (HMAC) to create one.
Is the hash uppercase or lowercase?
Both are the same hash. Hex hashes are usually written in lowercase, but some systems use uppercase. Pick either one, or Base64, under Hash format.
Are my text and files uploaded?
No. All hashing happens in your browser, and nothing you enter or drop in leaves your device.
