DevTools Logo

Hash Generator

Hash Generator: MD5, SHA-1, SHA-256 & SHA-512

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

    Paste any text and the Hash Generator computes SHA-1, SHA-256, SHA-384 and SHA-512 digests with the browser's native Web Crypto engine — select several algorithms and collect every digest in one pass. Output arrives as lowercase or uppercase hex, optionally colon-grouped, or as Base64, and the text can be encoded as UTF-8, UTF-16 or ASCII before hashing.

    MD5 and SHA-1 stay selectable but carry a legacy badge and a broken flag: use them only to match existing systems, never to protect new data. SHA-256 is the sensible default for file and message integrity, with SHA-384 and SHA-512 offering longer digests from the same family.

    Each result shows the digest's character length and timing, and the analysis card totals input size, encoding and elapsed milliseconds. A .txt file can be loaded into the editor, but its contents are read as text — hash binary files with sha256sum or certutil and compare the strings here.

    What this tool does not do

    • This is a one-way digest tool. It cannot reverse a hash back to the original input, and it does not store or rainbow-table your values.
    • MD5 and SHA-1 are shown for legacy checksums only — do not use them where collision resistance matters.

    How to use this tool

    1. Enter the text

      Type or paste the message, or load a sample such as a JSON payload.

    2. Select algorithms

      Toggle every digest you need; several can run in one pass.

    3. Tune the output

      Switch between hex and Base64, set the text encoding, and enable uppercase or colon grouping.

    4. Collect the digests

      Copy any single hash, grab them all at once, or download a JSON report with the statistics.

    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.

    Digest sizes and security status

    AlgorithmLength / status
    MD5128 bits (32 hex chars) — broken; legacy compatibility only
    SHA-1160 bits (40 hex chars) — deprecated after practical collisions
    SHA-256256 bits (64 hex chars) — the current default choice
    SHA-384384 bits (96 hex chars) — secure SHA-512 variant
    SHA-512512 bits (128 hex chars) — longest digest offered

    The SHA-1/SHA-2 digests are computed by the browser's Web Crypto API.

    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

    How long is a SHA-256 hash?

    Always 256 bits: 64 hexadecimal characters, or 44 Base64 characters including padding. The length never varies with input size — that fixed width is what makes digests usable as fingerprints.

    Can I reverse an MD5 hash?

    No. Hash functions are one-way by design, so a digest cannot be decoded back into the input. Rainbow-table lookups only reveal known strings, which is why salted, deliberately slow functions are required for anything secret.

    How do I verify a file checksum?

    Compare your digest with the publisher's: run sha256sum file (Linux/macOS) or certutil -hashfile file SHA256 (Windows), then match the hex strings character by character. Any differing character means corruption or tampering.

    Which hash should I use for passwords?

    None of these fast digests. Password storage needs a slow, salted function — bcrypt, Argon2 or scrypt — so stolen hashes resist brute force; the Bcrypt Generator produces proper password hashes.

    References & standards