2026-08-07

What is SHA-256? Hashing explained

Learn how SHA-256 hashes work, why they are one-way, and common uses for checksums - then generate a digest locally.

SHA-256 is a cryptographic hash function that maps any input to a fixed 256-bit digest - usually shown as 64 hexadecimal characters. The same input always produces the same hash; tiny input changes produce a completely different digest.

One-way fingerprints

Hashing is not encryption. You cannot reverse a SHA-256 digest to recover the original text. That makes it useful for integrity checks, content addressing, and detecting accidental changes - not for hiding data you later need to read back.

Where developers use SHA-256

  • Checksums and download integrity verification
  • Cache keys and content-addressed storage
  • Building blocks inside larger protocols (with care)
  • Fingerprinting non-secret config or payloads during debugging

Passwords are a special case

Do not store user passwords with plain SHA-256 alone. Prefer a dedicated password hashing scheme (argon2, bcrypt, scrypt) with salt on the server. SHA-256 alone is too fast for password storage against modern attacks.

Ready to hash a string? Generate a SHA-256 hex digest in your browser - nothing is uploaded.
Open the free SHA-256 tool →

Next reads: How to generate a SHA-256 hash · SHA-256 vs MD5