Hash Generator

Generate SHA-1, SHA-256, and SHA-512 cryptographic hashes from any text — all in your browser.

Advertisement
SHA-1
SHA-256
SHA-512
Advertisement

What Is a Cryptographic Hash Function?

A hash function takes an input of any size and produces a fixed-length output called a digest or hash. Hash functions are designed to be one-way: given only the hash output, it is computationally infeasible to determine the original input. Any change to the input — even a single character — produces a completely different hash (the avalanche effect). This makes hashes ideal for verifying data integrity without storing or transmitting the original data.

SHA-1 (160-bit)

SHA-1 produces a 160-bit (40-character hex) digest. Developed by the NSA and standardised in 1993, it was widely used in SSL/TLS certificates and digital signatures. SHA-1 is now considered cryptographically broken — collision attacks (two different inputs producing the same hash) have been demonstrated in practice. Do not use SHA-1 for any security-sensitive purpose. It is included here only for legacy compatibility and verification tasks.

SHA-256 (256-bit)

Part of the SHA-2 family, SHA-256 produces a 256-bit (64-character hex) digest. It is the current industry standard for security applications: TLS certificates, code signing, Bitcoin's proof-of-work, JWT signatures, file integrity verification, and password hashing (when combined with a proper KDF like bcrypt or Argon2). SHA-256 has no known practical vulnerabilities.

SHA-512 (512-bit)

SHA-512 produces a 512-bit (128-character hex) digest, offering the largest security margin of the three. On 64-bit processors, SHA-512 is often faster than SHA-256 due to its optimised 64-bit word operations. Use SHA-512 when maximum security margin is required. All hashing in this tool uses the browser's native crypto.subtle.digest() API — no data leaves your device.

Common Uses of Hash Functions

  • File integrity: Verify a downloaded file has not been corrupted or tampered with by comparing its hash to the published hash.
  • Password storage: Databases never store plain passwords — only their salted hashes.
  • Data deduplication: Identify duplicate files by comparing hashes rather than content.
  • Digital signatures: Sign a hash of a document rather than the entire document.