SHA-256 Hash Explained

Learn what SHA-256 hashing is, how it works, and when to use cryptographic hash functions.

SHA-256 is a cryptographic hash function that produces a fixed 256-bit (64 hex character) output from any input. The same input always produces the same hash, but even a tiny change in input produces a completely different hash.

Common uses

  • Verifying file integrity (checksums)
  • Password storage (with salt and key stretching)
  • Blockchain and cryptocurrency
  • Digital signatures and certificates
  • Detecting duplicate content

Hash vs encryption

Hashing is one-way — you cannot reverse a hash to get the original input. Encryption is two-way — you can decrypt with the right key. Use hashing when you need to verify data without storing the original.

Generate SHA-256 hash