SHA-1 Hash Calculator

hash

All hashing runs in your browser. Data is never sent to any server.

Text Input

File Input

📁

Drag & drop a file or click to select

1. How to Use

  1. Paste text or upload a file to generate SHA-1 hash online.
  2. Click 'Generate SHA-1 Hash' to get the 40-character hexadecimal result.
  3. Verify SHA1 checksums by pasting the expected hash and comparing with new input.
  4. Use for Git hash verification or SHA1 checksum comparison.
  5. File support: Drag-and-drop or select files for SHA-1 computation.

2. How It Works

SHA-1 also uses the Merkle–Damgård construction with 512-bit blocks and a 160-bit state (five 32-bit words A,B,C,D,E).

The message schedule extends 16 words to 80 words: W[t] = ROL(W[t-3]⊕W[t-8]⊕W[t-14]⊕W[t-16], 1) for t≥16.

Four round functions and constants: f₀,f₁,f₂,f₃ with K₀=0x5A827999, K₁=0x6ED9EBA1, K₂=0x8F1BBCDC, K₃=0xCA62C1D6. Each of 80 rounds: T=ROL(A,5)+fₜ(B,C,D)+E+W[t]+Kₜ; E=D; D=C; C=ROL(B,30); B=A; A=T.

Initial hash values are the first five primes; final output is 160 bits (40 hex characters).

3. About SHA-1

SHA-1 (Secure Hash Algorithm 1) is a 160-bit hash function developed by the NSA and standardized by NIST in 1995.

This SHA-1 hash calculator computes SHA1 hashes for text and files in your browser. SHA-1 is used in Git commit hashes, TLS certificates (legacy), and various checksum applications.

SHA-1 is cryptographically broken—collision attacks are practical. It remains in use for Git and legacy compatibility but should not be used for new security-sensitive designs.

4. Advantages

  • Git compatibility: Git uses SHA-1 for commit and object IDs; this tool helps verify or explore Git hashes.
  • Legacy support: Many existing systems and certificates still use SHA-1.
  • Deterministic: Same input always produces the same SHA-1 hash.
  • Privacy-first: All hashing runs locally in your browser.

5. Real-World Use Cases

  • Git object verification: Check Git commit hashes, blob hashes, or tree hashes.
  • Legacy TLS/SSL: Inspect SHA-1 fingerprints for older certificates.
  • Checksum validation: Verify file integrity where SHA-1 is the published checksum.
  • Compatibility testing: Ensure your application produces correct SHA-1 hashes.