SHA-1 vs SHA-256 Hash – 40 vs 64 Character Digests

Local only

Distinguish SHA-1 from SHA-256 when the source text matches but digest length and value differ.

5 chars · 1 line

Waiting for input

Loading hash algorithms…

Hash algorithm comparison

Why do SHA-1 and SHA-256 differ for the same text?

SHA-1 and SHA-256 are different digest algorithms. The same hello bytes produce a 40-character SHA-1 value and a 64-character SHA-256 value in hexadecimal. This tool is free to use. No account or payment is required.

Last updated

What you can do here

  • MD5 text digests
  • SHA-1 text digests
  • SHA-256 text digests
  • SHA-512 text digests
  • Exact text byte sensitivity
  • Browser-local hashing

Steps

  1. Keep the input identical.
  2. Check whether the digest is 40 or 64 hex characters.
  3. Regenerate both sides with the same named algorithm.

SHA-1 and SHA-256 have different digest sizes

SHA-1 outputs 160 bits; SHA-256 outputs 256 bits. A migration changes the digest algorithm, so existing SHA-1 values cannot simply be compared with new SHA-256 values.

SHA-1 vs SHA-256 for hello

Only the algorithm changes.

Text input

hello

Digest comparison

SHA-1: aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d
SHA-256: 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Common questions

Frequently asked questions

Can a SHA-1 digest be converted into SHA-256?

Not into the SHA-256 digest of the original text without the original input. Re-hash the original bytes using SHA-256.

Which output is longer?

SHA-256 uses 64 hex characters; SHA-1 uses 40.

Debugging a specific Hash issue? Browse Hash troubleshooting.