SHA-256 of a word
hello
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Always 64 hex characters (256 bits).
Generate the SHA-256 hash of text or a file and verify downloads against a published SHA-256 checksum. Fast, free, and nothing leaves your browser.
hello
2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824
Always 64 hex characters (256 bits).
hello world
b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
Adding one word changes every part of the hash.
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
Seeing this value usually means an empty file or empty input was hashed.
SHA-256 is a cryptographic hash function that turns any input into a 256-bit fingerprint, written as 64 hexadecimal characters. It belongs to the SHA-2 family, designed by the NSA and published by NIST in 2001 (FIPS 180-2). It is the most widely used secure hash today: no collision has ever been found, and none is expected with current technology.
integrity="sha256-…" attribute on scripts and styles.The message is padded to a multiple of 512 bits, with its length added at the end. It is then processed in 512-bit blocks: each block goes through 64 rounds of bit operations (rotations, XORs and additions) that mix it into eight 32-bit state words. After the last block, those eight words, joined together, are the 256-bit hash.
| Property | SHA-256 |
|---|---|
| Output size | 256 bits (64 hex characters, 44 Base64 characters) |
| Block size | 512 bits |
| Rounds | 64 |
| Collision found | No |
| Standard | FIPS 180-4 |
Drop the file into the tool, paste the expected checksum into Compare with a checksum, and look for the green row. On the command line:
# Linuxsha256sum file.iso # Check against a SHA256SUMS filesha256sum -c SHA256SUMS --ignore-missing # macOSshasum -a 256 file.iso # Windows PowerShellGet-FileHash .\file.iso -Algorithm SHA256SHA-256 alone is not for passwords. It is secure as a fingerprint, but fast: an attacker with a GPU can test billions of password guesses per second. Use bcrypt or Argon2 for passwords.
const bytes = new TextEncoder().encode('hello');const hash = await crypto.subtle.digest('SHA-256', bytes);const hex = [...new Uint8Array(hash)].map((b) => b.toString(16).padStart(2, '0')).join('');// "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"import { createHash } from 'node:crypto'; createHash('sha256').update('hello').digest('hex');hash('sha256', 'hello');hash_file('sha256', 'file.iso');import hashlib hashlib.sha256(b'hello').hexdigest() # Large files, piece by pieceh = hashlib.sha256()with open('file.iso', 'rb') as f: for chunk in iter(lambda: f.read(1 << 20), b''): h.update(chunk)print(h.hexdigest())My SHA-256 differs from the terminal
echo adds a newline. Use echo -n "text" | sha256sum or printf "text" | sha256sum to hash exactly the text.
The checksum of my download does not match
Download the file again: it is incomplete or corrupted. If it still does not match, do not run it, and check that you are using the checksum from the official site.
The website shows the checksum in Base64
Subresource Integrity and some APIs use Base64 (sha256-…). Paste the part after sha256- into Compare, or choose Base64 under Format.
256 bits: 64 hexadecimal characters, or 44 characters in Base64.
No. SHA-256 is a one-way function. The only way to find an input is to guess it, which is impractical for anything but short or common values.
Yes. No practical attack on SHA-256 is known, and it is approved for government and financial use.
Both are SHA-2. SHA-512 gives a 512-bit hash and uses 64-bit operations, so it is often faster on 64-bit computers. SHA-256 is more widely used for checksums.
No. The file is read and hashed in your browser, in 4 MB pieces, and never leaves your device.
Free, private developer tools that run in your browser. No signup, nothing uploaded, no waiting.
Tip: press Ctrl D to bookmark dev247.