Hash Generator

Generate MD5, SHA-1, SHA-256, SHA-512, and SHA3 hashes from text

Enter text to hash...
Loading editor...

Hash Generator — Compute MD5, SHA-1, SHA-256 & SHA-512 Hashes Online

Understanding the Basics

A cryptographic hash function takes an input of arbitrary length and produces a fixed-length output (the "hash" or "digest") with three essential properties: determinism (the same input always produces the same hash), avalanche effect (a single bit change in input completely changes the output), and pre-image resistance (it is computationally infeasible to recover the input from the hash alone). MD5 produces 128-bit (32-character hex) digests and was once the standard for file integrity verification, but has been cryptographically broken — MD5 collisions can be generated in seconds, meaning two different inputs can produce the same MD5 hash. SHA-1 produces 160-bit digests and has also been broken (Google's SHAttered attack in 2017 demonstrated a SHA-1 collision). SHA-256 (part of the SHA-2 family) produces 256-bit digests and remains cryptographically secure, while SHA-512 provides 512-bit digests for even higher security margins. Common use cases include: verifying downloaded file integrity by comparing a published SHA-256 hash, creating content-addressable storage (Git stores objects by their SHA-1 hash of content), generating ETag headers for HTTP caching, and creating HMAC message authentication codes. Our tool computes all four algorithms client-side using the Web Crypto API.

How to Use the Tool

  1. Type or paste the text you want to hash into the input field.
  2. Select one or more hash algorithms: MD5, SHA-1, SHA-256, and/or SHA-512.
  3. The hash digest appears instantly below as a lowercase hexadecimal string.
  4. For file hashing, use the "Upload File" button to hash a local file — the file content is processed in-browser.
  5. Copy individual hash values with the copy icon beside each result.

Key Features & Specifications

  • Computes MD5, SHA-1, SHA-256, and SHA-512 in the browser using the Web Crypto API (SHA-2) and a pure-JS MD5/SHA-1 implementation
  • Supports text input and file upload for hashing arbitrary binary files
  • Displays output in lowercase hex, uppercase hex, and Base64 encoding formats
  • Shows digest length in bits alongside each hash to compare algorithm output sizes
  • 100% offline — file content and input text never leave the browser

Frequently Asked Questions (FAQ)

Q:Why is MD5 considered insecure for security purposes?
MD5 is vulnerable to collision attacks — an attacker can craft two different inputs that produce the same MD5 hash, enabling document forgery and signature bypass. For security-critical applications (code signing, TLS certificates, password hashing), use SHA-256 or SHA-512. MD5 is still acceptable for non-security checksum uses like detecting accidental file corruption.
Q:Can I use these hashes to store passwords securely?
No. MD5, SHA-1, and SHA-256 are fast by design, making them unsuitable for password hashing. An attacker with a GPU can compute billions of SHA-256 hashes per second. For password storage, use slow adaptive algorithms specifically designed for it: bcrypt, Argon2id, or scrypt.
Q:How can I verify a downloaded file using SHA-256?
Compute the SHA-256 hash of the downloaded file using this tool (or sha256sum on Linux/Mac), then compare the output character-by-character to the hash published on the software vendor's website. Identical hashes confirm the file was not corrupted or tampered with during download.