What is a cryptographic hash?
A cryptographic hash turns any input into a fixed-size digest (32 bytes for SHA-256) such that the same input always gives the same digest, a one-character change gives a completely different one, and the input cannot be recovered from the output. Hashes verify file integrity, fingerprint content and underpin signatures and HMAC. SHA-256 and the SHA-2 family are current; MD5 and SHA-1 are broken against deliberate collisions and should only be used as checksums.
Security note: A plain hash is not a password store. Passwords need a slow, salted algorithm — Argon2id, scrypt or bcrypt — because SHA-256 and MD5 can be tried billions of times per second.
| Algorithm | Digest sizebits | Hexchars | Base64chars | Status |
|---|---|---|---|---|
| MD5 | 12816 bytes | 32 | 2422 unpadded | BrokenChecksums only |
| SHA‑1 | 16020 bytes | 40 | 2827 unpadded | BrokenChecksums only |
| SHA‑256 | 25632 bytes | 64 | 4443 unpadded | CurrentSHA-2 |
| SHA‑384 | 38448 bytes | 96 | 6464 unpadded | CurrentSHA-2 |
| SHA‑512 | 51264 bytes | 128 | 8886 unpadded | CurrentSHA-2 |
- This tool
Lengths come from the tool’s own hash engine; uppercase hex has the same length, and Base64url the length without padding. None of these alone is a password store: use Argon2id, scrypt or bcrypt.
How to use SHA-256 Generator
- Paste the text to hash.
- Select the output format.
- Paste an expected hash to verify a match.
- Copy or download the digest.
SHA-256 Generator features
- SHA-256 computed with WebCrypto — fast and fully local
- Lowercase/uppercase hex, Base64, Base64url and binary output
- Compare against an expected digest (accepts "sha256=" prefixes)
- Whitespace trimming to match printf-style inputs
- Live hashing with input size and byte count
SHA-256 Generator example
SHA-256 of "abc"
Input:
abcOutput:
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015adFrequently asked questions about SHA-256 Generator
Is SHA-256 suitable for storing passwords?
Not on its own. It is fast, which helps attackers. Use a purpose-built password hash (Argon2id, bcrypt or scrypt) with a salt. SHA-256 is ideal for integrity checks, content addressing, HMAC and signatures.
How do I verify a downloaded file's checksum?
Paste the published hash in "Compare with expected hash". For files, compute the digest with "sha256sum file" (Linux/macOS) or "Get-FileHash file" (PowerShell) and compare — this tool hashes text, not uploaded files.
Uppercase or lowercase hex — does it matter?
They represent the same bytes. Most tools print lowercase; the comparison here ignores case and also accepts Base64.
What is the output size?
256 bits: 64 hex characters or 44 Base64 characters (43 without padding).
Technical notes
SHA-256 belongs to the SHA-2 family standardised in FIPS 180-4 and is the default choice for integrity checks, HMAC, TLS and code signing. The digest is deterministic: the same UTF-8 bytes always produce the same 256-bit value.
References
- FIPS 180-4: Secure Hash Standard (SHS)The US federal standard that specifies the SHA-1 and SHA-2 family of hash functions.
- RFC 6234: US Secure Hash Algorithms (SHA and SHA-based HMAC and HKDF)Reference descriptions and code for SHA-1, SHA-224/256/384/512 and their use in HMAC.
- RFC 1321: The MD5 Message-Digest AlgorithmThe original MD5 definition. MD5 is now considered broken for signatures and passwords; it remains useful only as a checksum.