DevTools Logo

Hash Generator

Hash Generator

Generate multiple cryptographic hashes with comprehensive analysis and security information.

Input & Settings

128-bit
Legacy
Fast but cryptographically broken
160-bit
Legacy
Legacy algorithm, avoid for security
256-bit
Secure and widely used
384-bit
High security variant
512-bit
Maximum security variant

Hash Examples & Use Cases

Password Verification

Hash passwords before storing in databases.

Input: MySecurePassword123!
SHA-256: a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3

Note: Add salt for production use!

API Key Generation

Generate unique identifiers from user data.

Input: user123:timestamp:secret
SHA-512: 8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92

Use case: API authentication

Details

A hash function takes an input (or "message") and returns a fixed-size string of bytes, typically a digest, that is unique to the input. Hash functions are used for data integrity verification, password storage, and in various cryptographic protocols. Note: MD5 and SHA-1 are considered cryptographically broken and should not be used for security purposes, but are included for legacy compatibility or non-security use cases.

More Examples

Generating MD5 Hash

Input: Hello World!
MD5: ed076287532e86365e841e92bfc50d8c

Generates a 128-bit MD5 hash. Commonly used for checksums.

Generating SHA-1 Hash

Input: Hello World!
SHA-1: 2ef7bde608ce5404e97d5f042f95f89f1c232871

Generates a 160-bit SHA-1 hash. Avoid for security.

Generating SHA-256 Hash

Input: Hello World!
SHA-256: 7f83b1657ff1fc53b92dc18148a1d65dfc2d4b1fa3d677284addd200126d9069

Generates a 256-bit SHA-2 hash. A common standard for security.

Generating SHA-512 Hash

Input: Hello World!
SHA-512: 861844d6704e8573fec34d967e20bcfef3d424cf48be04e2acdf016dee9819881e4143a63678678981522160749403c0645688149a05924766849094eff181ae

Generates a 512-bit SHA-2 hash, offering potentially higher security than SHA-256.

    Examples

    SHA-256 digest of a short string

    Input
    hello world
    Output
    b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

    SHA-256 always returns a 64-character hex digest for any input; the output is identical on every run and on every machine.

    Avalanche effect — one byte changes everything

    Input
    hello world
    hello-world
    Output
    SHA-256("hello world")  = b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9
    SHA-256("hello-world") = afa27b44d43b02a9fea41d13cedc2e4016cfcf87c5dbf990e593669aa8ce286d

    Removing a single space or swapping it for a hyphen produces a completely unrelated digest — that avalanche is what makes hashes useful for integrity checks.

    Same input, different digest lengths

    Input
    hello
    Output
    MD5      5d41402abc4b2a76b9719d911017c592            (32 hex chars)
    SHA-256  2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824  (64 hex chars)

    MD5 always yields a 128-bit (32-hex) digest and SHA-256 a 256-bit (64-hex) one, regardless of input length. Longer digests mean astronomically fewer collisions — which is exactly why MD5 is unfit for security.

    About this tool

    A cryptographic hash function turns any input — a word, a file, a whole document — into a fixed-length digest that changes completely if even one byte of the input changes. Hashes are used for data-integrity checks (verifying a download wasn't corrupted or tampered with), deduplication, checksums, and as building blocks in signatures and other protocols. Crucially, hashing is one-way: you cannot reverse a digest back to the original input.

    This tool computes several hash algorithms at once from text or an uploaded file, using the browser's Web Crypto API so nothing is ever uploaded. Note that MD5 and SHA-1 are cryptographically broken and must not be used where collision resistance matters (like signatures or password storage) — they remain useful only for legacy compatibility and non-security checksums. For security-sensitive work, prefer SHA-256 or SHA-512.

    How to use

    1. Enter your input

      Type or paste text, or upload a file to hash its contents.

    2. Read the digests

      The tool computes multiple algorithms simultaneously and shows each hexadecimal digest.

    3. Pick the right algorithm

      Use SHA-256 or SHA-512 for anything security-related; MD5/SHA-1 only for legacy or non-security checksums.

    4. Copy the hash

      Copy any digest to compare against a published checksum or store as a fingerprint.

    Use cases

    Verifying downloads

    Compute SHA-256 on an ISO, container image, or archive and compare it to the publisher's checksum to confirm the download wasn't corrupted or tampered with.

    Content-addressable storage & deduplication

    Use a digest as the key for a blob in object storage or Git; identical inputs map to identical keys, so duplicates collapse and references stay stable.

    Quick checksums for files and payloads

    Get MD5 or SHA-1 digests for legacy systems, ETag values, or non-security fingerprinting where backward compatibility matters.

    Detecting accidental duplication in data exports

    Hash every row of a CSV or JSON dump to spot identical entries, or compare expected vs. received digests to confirm a transfer succeeded end-to-end.

    Supported algorithms

    AlgorithmDigest size / use
    MD5128-bit — legacy checksums only (broken, not for security)
    SHA-1160-bit — legacy compatibility only (broken, not for security)
    SHA-256256-bit — recommended default for integrity and security
    SHA-384384-bit — SHA-2 family, stronger digest
    SHA-512512-bit — strongest SHA-2 variant

    Hashing runs locally via the Web Crypto API — your input is never uploaded.

    Common mistakes

    Mistake:Using MD5 or SHA-1 for anything security-sensitive.

    Fix:Both have public practical collisions — use SHA-256 or stronger. The SHAttered attack produced two PDFs with the same SHA-1; treating them as unique is a real bug, not a theoretical one.

    Mistake:Hashing passwords with SHA-256 and calling it stored.

    Fix:Fast hashes are the wrong tool — an attacker cracks them at billions per second on a GPU. Use a slow KDF such as bcrypt, scrypt, or Argon2 with a per-user salt.

    Mistake:Assuming the hash of a string is language-independent.

    Fix:A digest is a function of bytes, not of characters. The same word in UTF-8, UTF-16, or Latin-1 produces three different digests — normalize to UTF-8 first.

    Mistake:Truncating a digest, or comparing only its first few characters.

    Fix:A prefix collision is trivial to find, so matching the first 8–16 characters proves nothing. Store and compare the full digest; if you must shorten an identifier, use a dedicated short-ID scheme rather than a cropped hash.

    Frequently asked questions

    References & standards