Category: Hashing Tools

  • SHA-512 Hash Generator: Compute 512-bit Digests [2026]

    SHA-512 Hash Generator: Compute 512-bit Digests [2026]

    TL;DR: SHA-512 produces a 512-bit (64-byte / 128 hex character) cryptographic hash from any input. It’s the strongest member of the SHA-2 family — 128-bit collision resistance, used for high-assurance file checksums, code-signing, password derivation (with bcrypt/argon2 wrappers), and forensic integrity verification. Our free SHA-512 hash generator uses the browser’s native SubtleCrypto API — same engine browsers use for HTTPS — and runs entirely on your device.

    SHA-512 is the largest of the SHA-2 family. It produces a 512-bit digest twice the size of SHA-256, with corresponding security against collision attacks. For most checksum use cases SHA-256 is enough; SHA-512 wins where you need extra margin (long-lived archive integrity, code-signing certificates valid for 5+ years, forensic chain-of-custody hashes) or where the platform standard mandates it (Git uses SHA-1 today but is migrating to SHA-256; some EU government systems specify SHA-512). On 64-bit hardware SHA-512 is actually faster than SHA-256 — it processes 8-byte blocks natively where SHA-256 processes 4-byte blocks.

    Our SHA-512 hash generator runs the browser’s native SubtleCrypto.digest('SHA-512', ...) implementation — the same code path that handles HTTPS certificate verification — and never uploads your input. Paste text or drop a file, and the hex digest appears instantly. This guide covers SHA-512 vs SHA-256 vs SHA-3, when each is the right pick, and the gotchas with binary-vs-text input encoding.

    SHA family at a glance

    Algorithm Output size Collision security Status
    MD5 128 bits Broken (collisions trivial) Checksums only, never security
    SHA-1 160 bits Broken (SHAttered, 2017) Legacy systems, Git (migrating)
    SHA-224 224 bits 112-bit security FIPS-compliant short hash
    SHA-256 256 bits 128-bit security De facto standard (TLS, Bitcoin, Git plan)
    SHA-384 384 bits 192-bit security SHA-512 truncated, used in PKI
    SHA-512 512 bits 256-bit security High-assurance, faster on 64-bit
    SHA-3 (Keccak) 224–512 bits Independent design, 128–256-bit Backup if SHA-2 ever weakens

    When to pick SHA-512 specifically

    SHA-256 is the default for almost every new system. SHA-512 makes sense when:

    • Long-lived archives. A digest you’ll verify in 20 years benefits from extra security margin. Government archives, legal-record systems, and long-term forensic chains of custody specify SHA-512.
    • 64-bit hardware. SHA-512 is 30–50% faster than SHA-256 on modern x86_64 CPUs because it processes 8-byte blocks natively. On 32-bit ARM (rare in 2026) the situation reverses — SHA-256 wins.
    • HMAC for sensitive material. HMAC-SHA-512 is preferred over HMAC-SHA-256 for high-value secrets like signing keys for code release.
    • Compliance mandates. Some EU government systems (BSI, ANSSI) specify SHA-512 minimum; some financial standards align with that.
    • Password-key derivation. PBKDF2 / Argon2 / bcrypt all support SHA-512 as the inner hash. Doesn’t make the password significantly stronger, but is sometimes specified by compliance frameworks.

    For everyday use — verify a download, hash a config file, generate a deterministic ID — SHA-256 is faster to compute and the 256-bit security is enough.

    How to compute SHA-512 in your browser

    1. Open the SHA-512 generator
    2. Type or paste text in the input — the digest appears live as you type
    3. Or drop a file — the digest is computed by streaming the bytes through SubtleCrypto, no upload
    4. Click Copy for the lowercase hex digest, or toggle UPPERCASE
    5. For HMAC mode, click HMAC, paste a key, and the HMAC-SHA-512 is computed

    Code: how to compute SHA-512 in JavaScript

    Browsers and Node.js 19+ both expose the WebCrypto API. The same code works everywhere:

    async function sha512(text) {
      const buffer = new TextEncoder().encode(text);
      const hash = await crypto.subtle.digest("SHA-512", buffer);
      return [...new Uint8Array(hash)]
        .map((b) => b.toString(16).padStart(2, "0"))
        .join("");
    }
    
    // sha512("hello world") returns
    // "309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f
    //  989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f"

    Common gotchas

    • Encoding matters before you hash. SHA-512 is a function over bytes, not characters. "café" in UTF-8 is 5 bytes; in Latin-1 it’s 4. The two produce different hashes. Always use UTF-8 for text input — the standard everywhere except some legacy Windows pipelines.
    • SHA-512 is not a password storage algorithm. Never store passwords as plain SHA-512 — even with a salt, the algorithm is too fast and vulnerable to GPU brute-force. Use bcrypt, scrypt, or argon2 for password storage; those use SHA internally as a building block but add deliberate slowness.
    • Trailing whitespace and line endings change the hash. A file ending with \n hashes differently from the same file ending without it. CRLF (\r\n) vs LF (\n) is a common cause of “the hashes don’t match” between Windows and macOS — normalise line endings before hashing.
    • UTF-8 BOM. A file saved as UTF-8 with BOM has an extra 3 bytes (EF BB BF) at the start. Same content, different hash. Strip BOMs if you compare hashes between platforms.
    • SHA-384 is SHA-512 truncated. SHA-384 uses the same algorithm internally, then truncates to 384 bits (96 hex chars). Both are valid SHA-2 hashes; pick based on output size needs.
    • Some legacy tools default to wrong hex case. Hex digests are case-insensitive when comparing, but tools default to lowercase or uppercase inconsistently. 309ecc... and 309ECC... represent the same hash.

    When NOT to use SHA-512

    For a password store, use bcrypt / scrypt / argon2 — those are designed to be deliberately slow against brute-force; SHA-512 alone is too fast. For non-cryptographic use cases (database keying, fingerprinting non-sensitive content), use a simpler hash like xxHash or FNV — they’re faster and don’t burn CPU on cryptographic strength you don’t need. For verifying that a small string hasn’t changed in a public ledger, SHA-256 is enough — half the bytes for the same practical security. For random-looking IDs in a URL, use a UUID or a random number; hashes are deterministic, which usually isn’t what you want for IDs.

    Frequently asked questions

    Is SHA-512 stronger than SHA-256?

    Yes — SHA-512 has 256-bit collision resistance vs SHA-256’s 128-bit. Both are far beyond what’s brute-forceable today. For most uses 128-bit security is more than enough; SHA-512 matters for long-lived archives and high-assurance contexts.

    Can SHA-512 be reversed?

    No. SHA-512 is a one-way function. Given a hash, there’s no method short of guessing every possible input that would recover the original. For “hash-cracking” attacks against weak inputs (short passwords, dictionary words), the attacker doesn’t reverse the hash — they hash candidate inputs until one matches. The defence is using slow algorithms (bcrypt) for passwords.

    Why is SHA-512 sometimes faster than SHA-256?

    SHA-512 processes 1024-bit blocks of data using 64-bit words. On a 64-bit CPU each word fits in a single register, giving SHA-512 a 30–50% throughput advantage over SHA-256 on modern x86_64. On 32-bit hardware (rare in 2026) the trade reverses.

    Should I use SHA-512 for password hashing?

    No, not directly. Use bcrypt, scrypt, or argon2id — those are deliberately slow and resistant to GPU brute-force. SHA-512 alone is millions of times too fast to use as a password store. Some compliance frameworks specify SHA-512 inside an HMAC or PBKDF2 wrapper; that’s fine, but plain SHA-512 of a password is a known anti-pattern.

    Is my input uploaded?

    No. The generator runs the browser’s native SubtleCrypto.digest API. Text and files are processed locally — never sent to our servers. You can verify with DevTools’ Network tab.

    What’s the file size limit?

    Effectively your browser’s available memory. Files up to several GB hash via streaming on desktop browsers; mobile is more limited. Hashing a 1 GB file takes 5–15 seconds on a recent laptop.

    Related tools and guides

     

  • SHA-1 Hash Generator: Compute SHA1 Online [2026]

    SHA-1 Hash Generator: Compute SHA1 Online [2026]

    TL;DR: SHA-1 produces a 160-bit (40 hex character) hash from any input. Designed by NSA in 1995, it was the workhorse of digital signatures and certificates for two decades. Practical collision attacks were demonstrated in 2017 (the SHAttered attack from Google + CWI), so SHA-1 is broken for security — never use it to sign documents, store passwords, or verify integrity against a malicious actor. It’s still legitimately used as a non-security checksum (Git internal object IDs, legacy software hashes, file fingerprinting). Our free SHA-1 generator uses WebCrypto, runs in your browser, and is honest about when SHA-1 is the right pick.

    SHA-1 is the awkward middle child of the cryptographic hash family — newer than MD5, older than SHA-2, broken by modern attacks but still embedded everywhere a system was designed before 2017. Git stores every object by its SHA-1 hash; many enterprise systems still verify file integrity with SHA-1 against an immutable log; some legacy package managers and OS update systems haven’t migrated. Knowing when SHA-1 is acceptable and when it’s a security hole is more useful than blanket avoidance.

    Our SHA-1 hash generator uses the browser’s native SubtleCrypto.digest('SHA-1', ...) API and runs entirely on your device. Use it to compute Git-compatible object hashes, verify legacy checksums, or recreate hashes from a reference document. This guide covers exactly how SHA-1 broke, where it’s still safe, and the migration path everywhere else.

    When SHA-1 is acceptable — and when it isn’t

    Use case SHA-1 OK? Why
    Git object IDs Yes (transitioning) Git uses SHA-1 with collision-detection patches; SHA-256 mode in Git 2.29+
    Non-adversarial file checksum Yes If no attacker controls the input, accidental collisions are astronomically unlikely
    Database fingerprint key Yes Internal use, no untrusted input
    TLS certificate signature No Browsers reject SHA-1 certificates since 2017
    Code signing No Microsoft, Apple, Mozilla all rejected SHA-1 by 2018
    Password storage (any form) No Use bcrypt / argon2; never use bare SHA-1 even with salt
    HMAC for authenticated messages Maybe HMAC-SHA-1 is weakly protected; use HMAC-SHA-256 instead
    Document signing for legal use No Forgeable by a determined attacker; use SHA-256+

    What “broken” actually means — the SHAttered attack

    In February 2017 Google and CWI published SHAttered: two distinct PDF files with the same SHA-1 hash. The attack required ~6,500 CPU-years and 110 GPU-years of compute, costing roughly $110,000 in 2017 cloud compute. Today the same attack costs a fraction of that. The attack proves that SHA-1 collisions are practically findable — meaning an attacker can craft two documents (an innocent contract and a malicious one) that hash to the same value, then swap them after one is signed.

    SHA-1 is still preimage-resistant for now — given a hash, there’s no faster way than brute force to find an input that produces it. So legacy systems that store SHA-1 hashes of inputs that already exist (e.g., file fingerprints in a backup index) aren’t immediately broken. But any system that signs, certifies, or trusts a SHA-1 hash from a third party is at risk.

    How to compute SHA-1 in your browser

    1. Open the SHA-1 hash generator
    2. Type or paste text — the digest appears live
    3. Or drop a file — bytes are streamed through the browser’s WebCrypto API, no upload
    4. Click Copy. Toggle UPPERCASE or lowercase hex output
    5. For HMAC-SHA-1 (legacy auth headers), click HMAC mode and paste a key

    Code: SHA-1 in JavaScript

    Same WebCrypto API as SHA-256 / SHA-512 — only the algorithm name changes:

    async function sha1(text) {
      const buffer = new TextEncoder().encode(text);
      const hash = await crypto.subtle.digest("SHA-1", buffer);
      return [...new Uint8Array(hash)]
        .map((b) => b.toString(16).padStart(2, "0"))
        .join("");
    }
    
    // sha1("hello world") returns
    // "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed"

    Common gotchas

    • UTF-8 encoding before hashing. Same input, different encoding, different hash. "café" as UTF-8 is 5 bytes; as Latin-1 it’s 4. Modern systems use UTF-8 universally.
    • Don’t HMAC-SHA-1 anything sensitive. HMAC-SHA-1 is weakly protected against today’s attacks. Webhook signatures from old AWS APIs and some payment processors still use it; new code should use HMAC-SHA-256.
    • Git’s SHA-1 hashes are slightly different. Git prefixes each blob with "blob <size>\0" before hashing. So Git’s hash of file content isn’t the same as sha1(content). Use git hash-object or our Git mode for an exact match.
    • Collisions are findable, but unlikely by accident. An accidental SHA-1 collision in a Git repo would require ~10^48 random commits — not a real concern. The risk is malicious collision, where an attacker crafts the input.
    • SHA-1 in TLS certificates is rejected. Browsers reject SHA-1-signed TLS certificates since early 2017. If you see a certificate-warning page mentioning SHA-1, the site needs to renew its certificate with SHA-256 minimum.
    • Length-extension attacks affect bare SHA-1. Like SHA-256 and MD5, SHA-1 is vulnerable to length extension if used as sha1(secret || data). Use HMAC instead — it’s specifically designed to resist this.

    When NOT to use SHA-1

    For new code: don’t reach for SHA-1 unless an external system specifically requires it. Use SHA-256 or SHA-512 by default — both are faster than SHA-1 on 64-bit hardware (yes, actually faster — modern CPU pipelines optimise for SHA-2). For password storage: never SHA-1, always bcrypt / scrypt / argon2id. For signing or verifying digital signatures: never SHA-1; standards bodies have deprecated it for over a decade. For TLS / X.509 certificates: SHA-1 is forbidden by browsers and CAs. Use this generator only for compatibility with legacy systems that still expect SHA-1 outputs.

    Frequently asked questions

    Why is SHA-1 still used in Git?

    Git was designed in 2005 around SHA-1 — every commit, tree, and blob is keyed by SHA-1. After SHAttered, Git added collision-detection (the sha1dc library) that catches the known collision attack and rejects matching inputs. Git 2.29 (2020) added experimental SHA-256 mode; full migration is multi-year and ongoing. For everyday use, Git’s SHA-1 keys are safe enough.

    How long does it take to compute a SHA-1 collision?

    The original SHAttered attack required $110,000 of cloud compute over two months. Modern GPU farms can produce a chosen-prefix collision in under a day for a few thousand dollars. Both are still expensive enough that most attackers won’t bother — but cheap enough that any system signing third-party documents with SHA-1 should migrate.

    Is SHA-1 still preimage-resistant?

    Yes, for now. Preimage resistance — given a hash, find an input that produces it — is much harder than collision resistance. No public preimage attack on SHA-1 exists. Systems that verify a hash of an existing file aren’t immediately broken; systems that trust a hash from an untrusted source are.

    Can I migrate my SHA-1 system to SHA-256?

    Yes — SHA-256 is a drop-in replacement for new hashes (output is twice as long: 64 hex chars vs 40). Migration plan: stop generating new SHA-1 hashes; recompute existing critical hashes in parallel as SHA-256; verify both during a transition period; remove SHA-1 once all consumers handle SHA-256.

    Is my input uploaded?

    No. The generator runs the browser’s WebCrypto API. Text and files are processed locally — never sent to our servers.

    Why are SHA-2 hashes faster than SHA-1 in 2026?

    Modern CPUs include hardware acceleration for SHA-2 (Intel SHA-NI, ARMv8 SHA extensions). SHA-1 doesn’t get the same hardware path on most chips. On a 2024 laptop, SHA-256 is typically 1.5–2× faster than SHA-1 for large inputs.

    Related tools and guides

     

  • SHA-224 Hash Generator: 224-bit FIPS Digest [2026]

    SHA-224 Hash Generator: 224-bit FIPS Digest [2026]

    TL;DR: SHA-224 produces a 224-bit (28-byte / 56 hex character) hash. It’s SHA-256 with a different starting state and a truncated 224-bit output. Designed by NIST in 2004 to provide FIPS-compliant 112-bit collision resistance — useful when you need a SHA-2-family hash but want shorter output than SHA-256. Real-world use: 3DES key derivation, NIST SP 800-57 short-hash specifications, and storage-constrained contexts. Our free SHA-224 hash generator uses the browser’s native WebCrypto API.

    SHA-224 is the rarely-used cousin of SHA-256. It exists for one specific reason: NIST needed a SHA-2 family member that matched the output size of legacy 112-bit security applications (mainly 3DES key derivation and some FIPS-mandated short-hash specifications). For most modern use, SHA-256 is the default — same algorithm internally, longer output, more security margin. But if you’re maintaining a system that specifies SHA-224 for compliance, or doing 3DES key derivation per FIPS 800-57, this is the algorithm.

    Our SHA-224 hash generator uses the browser’s native SubtleCrypto.digest('SHA-224', ...) implementation. Paste text or drop a file — runs entirely on your device. This guide covers SHA-224’s design, when it’s the right pick over SHA-256, and the gotchas with internal state differences.

    SHA-224 vs SHA-256 — when each wins

    Algorithm Output Collision security Use case
    SHA-224 224 bits (56 hex) 112-bit 3DES key derivation, FIPS short-hash mandates
    SHA-256 256 bits (64 hex) 128-bit Default for new systems
    SHA-384 384 bits (96 hex) 192-bit PKI certificates, high-assurance signatures
    SHA-512 512 bits (128 hex) 256-bit Long-lived archives, when SHA-256 isn’t enough

    How SHA-224 differs from SHA-256

    Both algorithms run the same compression function on 512-bit blocks. The only differences:

    • Initial hash value (IV): SHA-224 uses a different 8-word starting state. This means truncating the SHA-256 output to 224 bits is not the same as computing SHA-224 — they produce different results.
    • Output length: SHA-224 returns 7 of the 8 final words (28 bytes); SHA-256 returns all 8 (32 bytes).
    • Performance: identical — the work is the same, only the IV and truncation differ.

    The “different IV” is critical. If you’re verifying a SHA-224 hash, you must compute SHA-224 specifically, not SHA-256-then-truncate. Get this wrong and your hashes never match.

    When you’d actually use SHA-224

    SHA-224 is uncommon in 2026. Real use cases:

    • FIPS 800-57 compliance: NIST’s key-management standard sometimes specifies 112-bit security strength, and SHA-224 is the matching SHA-2 family member.
    • 3DES key derivation: 3DES uses 168-bit keys with 112-bit security; SHA-224 produces a hash matching that strength. (3DES itself was deprecated by NIST in 2017 — most systems have moved to AES.)
    • Federal procurement specs: some old US government RFP / SOW documents specify SHA-224 explicitly. Match the spec; don’t substitute SHA-256.
    • Bandwidth-constrained protocols: 56 hex characters vs 64 saves a few bytes per message in tight protocols (extremely rare in 2026).

    For new code without a specific compliance reason, use SHA-256. The 8 extra hex characters cost nothing and you get 16 more bits of security margin.

    How to compute SHA-224 in your browser

    1. Open the SHA-224 generator
    2. Type or paste text — the digest appears live as you type
    3. Or drop a file — bytes are streamed through the browser’s WebCrypto API
    4. Click Copy. Toggle UPPERCASE or lowercase hex output
    5. For HMAC-SHA-224, enter a key in HMAC mode

    Code: SHA-224 in JavaScript

    async function sha224(text) {
      const buffer = new TextEncoder().encode(text);
      const hash = await crypto.subtle.digest("SHA-224", buffer);
      return [...new Uint8Array(hash)]
        .map((b) => b.toString(16).padStart(2, "0"))
        .join("");
    }
    
    // sha224("hello world") returns
    // "2f05477fc24bb4faefd86517156daccfa3e6488427d1f0f217f04b6e"

    WebCrypto support: Chrome 37+, Firefox 34+, Safari 11+ — universal in 2026. SHA-224 is part of the WebCrypto digest algorithm set since the spec finalised.

    Common gotchas

    • Don’t confuse SHA-224 with truncated SHA-256. SHA-224 has a different IV. sha256(x).substring(0, 56) !== sha224(x). Compute SHA-224 specifically.
    • UTF-8 encoding before hashing. Same input, different encoding, different hash. Always use UTF-8.
    • Don’t use for password storage. SHA-224, like other SHA-2 members, is too fast for password storage. Use bcrypt / argon2id with passwords.
    • Some libraries don’t ship SHA-224. Older crypto libraries (PHP’s hash() pre-7.0, some C libraries) don’t include SHA-224. Verify your destination supports it before specifying.
    • Length-extension attacks affect SHA-224 too. Like SHA-256, vulnerable to length extension if used as sha224(secret || data). Use HMAC-SHA-224 instead.
    • If you can choose, choose SHA-256. Only use SHA-224 if a spec mandates it. The 8 extra hex characters are free.

    When NOT to use SHA-224

    For new systems without compliance requirements: use SHA-256. For password storage: never SHA-224 (or any plain SHA); use bcrypt / scrypt / argon2id. For TLS / X.509 certificates: SHA-256 minimum (SHA-224 isn’t supported by most CAs). For long-lived archives: SHA-512 for the extra security margin. SHA-224 is a niche tool — match it to a specific spec, otherwise pick a sibling.

    Frequently asked questions

    Is SHA-224 just truncated SHA-256?

    No. They share the same compression function but use different initial hash values (IVs). Truncating SHA-256 to 56 hex characters does NOT produce the SHA-224 hash. Compute SHA-224 specifically using the WebCrypto API or a dedicated library.

    Should I use SHA-224 instead of SHA-256?

    No, unless a spec mandates it. SHA-224 saves 8 hex characters in output but provides 16 fewer bits of collision security. The bandwidth saving is negligible in 2026; SHA-256 is the safer default for new systems.

    Why does SHA-224 even exist?

    NIST designed it in 2004 for compliance with key-management standards that specify 112-bit security strength — matching legacy systems like 3DES key derivation. Most legacy systems have moved on; SHA-224 is now mostly used in older federal procurement specs.

    Is the WebCrypto API support universal?

    Yes — SHA-224 has been part of WebCrypto since the spec finalised in 2014. Chrome 37+, Firefox 34+, Safari 11+, Edge 12+. Universal in 2026.

    Is my input uploaded?

    No. The generator runs the browser’s WebCrypto API. Text and files are processed locally — never sent to our servers.

    Can SHA-224 be reversed?

    No. Like all SHA-2 hashes, SHA-224 is a one-way function. Given a hash, there’s no method short of brute force to recover the input. Cracking weak inputs (short passwords) involves trying candidates until one matches — defence is using slow algorithms (bcrypt) for passwords.

    Related tools and guides

     

  • SHA-384 Hash Generator: 384-bit Digest [2026]

    SHA-384 Hash Generator: 384-bit Digest [2026]

    TL;DR: SHA-384 produces a 384-bit (48-byte / 96 hex character) hash. It’s SHA-512 with a different starting state and a truncated 384-bit output. 192-bit collision resistance — overkill for most uses, but mandated in NSA Suite B / CNSA-compliant cryptography, TLS 1.3 cipher suites, and US government high-assurance systems. Faster than SHA-256 on 64-bit hardware. Our free SHA-384 hash generator uses the browser’s native WebCrypto API.

    SHA-384 occupies the same family-niche as SHA-224: a SHA-2 hash with truncated output for compliance reasons. Where SHA-224 is the truncated SHA-256 for legacy 112-bit security, SHA-384 is the truncated SHA-512 for high-security applications that don’t need a full 512-bit hash but want more than SHA-256’s 128-bit collision resistance. Real-world use is concentrated in government and high-assurance crypto:

    • TLS 1.3: the TLS_AES_256_GCM_SHA384 cipher suite uses SHA-384 in HKDF for key derivation.
    • NSA Suite B / CNSA: the US National Security Agency’s commercial cryptography spec requires SHA-384 (or SHA-512) for top-secret data classifications.
    • PKI / X.509 certificates: ECDSA signatures over P-384 curves naturally pair with SHA-384.
    • Long-lived archive integrity: the extra 64 bits over SHA-256 add comfortable security margin.

    Our SHA-384 hash generator uses the browser’s native SubtleCrypto.digest('SHA-384', ...) API — same code path that handles HTTPS certificate verification — and runs entirely on your device. This guide covers when SHA-384 is the right pick, the performance characteristics, and the gotchas with truncation.

    SHA-2 family at a glance

    Algorithm Output Collision security Performance
    SHA-224 224 bits 112-bit Same as SHA-256
    SHA-256 256 bits 128-bit Slower on 64-bit
    SHA-384 384 bits 192-bit Same as SHA-512 (faster on 64-bit)
    SHA-512 512 bits 256-bit ~30% faster than SHA-256 on 64-bit

    Why SHA-384 is faster than SHA-256 on modern hardware

    SHA-384 uses the SHA-512 compression function — operating on 64-bit words and 1024-bit blocks — and just truncates the output. On a 64-bit CPU each word fits in a single register. SHA-256, despite producing a smaller output, runs on 32-bit words requiring more operations per byte hashed.

    Benchmark on a 2024 laptop:

    • SHA-256: ~600 MB/s
    • SHA-384: ~880 MB/s (≈47% faster)
    • SHA-512: ~880 MB/s (same internal work as SHA-384)

    Counter-intuitively, picking SHA-384 over SHA-256 for new code can mean both more security and better performance on 64-bit hardware. The trade-off is 32 extra hex characters in output.

    When you’d actually use SHA-384

    • NSA Suite B / CNSA-compliant systems. US government top-secret classification mandates SHA-384 minimum. If you’re in defence / intelligence contracting, this is the spec.
    • TLS 1.3 with AES-256-GCM. The TLS_AES_256_GCM_SHA384 cipher suite is one of TLS 1.3’s three default suites. Browsers negotiate it automatically; you don’t pick it manually.
    • PKI signatures with P-384 curves. ECDSA on the NIST P-384 curve naturally pairs with SHA-384 for matching security level.
    • Compliance frameworks specifying 192-bit security. Some financial regulations (PCI DSS in select profiles), ANSSI guidelines, BSI specs.
    • Long-lived archive integrity. The 64 extra bits over SHA-256 add margin for hashes verified decades from now.

    For most everyday checksums and integrity verification, SHA-256 is the right default — universally supported, established, well-tested. SHA-384 is for compliance-driven cases.

    How to compute SHA-384 in your browser

    1. Open the SHA-384 generator
    2. Type or paste text — the digest appears live
    3. Or drop a file — bytes streamed through WebCrypto, no upload
    4. Click Copy. Toggle UPPERCASE / lowercase output
    5. For HMAC-SHA-384, click HMAC mode and paste a key

    Common gotchas

    • SHA-384 is not truncated SHA-512. Like SHA-224 / SHA-256, the truncated variants use different initial hash values. sha512(x).substring(0, 96) !== sha384(x). Always compute SHA-384 specifically.
    • UTF-8 encoding before hashing. Same input, different encoding, different hash. Use UTF-8.
    • Don’t use for password storage. SHA-384 is too fast — use bcrypt / scrypt / argon2id for passwords.
    • HMAC-SHA-384 has different block size. SHA-384 / SHA-512 use 1024-bit (128-byte) blocks; SHA-256 uses 512-bit (64-byte) blocks. HMAC implementations need to use the matching block size — common bug in hand-rolled HMAC code.
    • Length-extension affects bare SHA-384 too. Use HMAC, not sha384(secret || data).
    • Some old systems don’t ship SHA-384. Older PHP, older Java, very old C libraries may lack SHA-384. Check support before specifying.

    When NOT to use SHA-384

    For everyday integrity checks (file checksums, deterministic IDs, message integrity in non-compliance contexts), SHA-256 is the right default — universally supported, smaller output, well-known. For password storage: use bcrypt / scrypt / argon2id; never plain SHA-384. For the longest possible security margin in archive integrity: SHA-512 (full output, same algorithm internally). For TLS 1.3 cipher suite selection: don’t manually pick — let the protocol negotiate. Use SHA-384 specifically when a spec mandates it.

    Frequently asked questions

    Is SHA-384 stronger than SHA-256?

    Yes — 192-bit collision resistance vs SHA-256’s 128-bit. Both are far beyond what’s brute-forceable today; SHA-384 matters when compliance frameworks demand the higher security level (NSA Suite B / CNSA, certain financial standards).

    Why is SHA-384 sometimes faster than SHA-256?

    SHA-384 uses the SHA-512 compression function, which operates on 64-bit words. On 64-bit CPUs each word fits a single register, giving SHA-384 / SHA-512 a 30–50% throughput advantage over SHA-256. On 32-bit hardware (rare in 2026) the trade reverses.

    Is SHA-384 just truncated SHA-512?

    Same compression function, different initial hash values (IVs). Truncating SHA-512 to 96 hex characters does NOT produce the SHA-384 hash. Always compute SHA-384 specifically.

    Should I use SHA-384 or SHA-512 for new code?

    Without a specific compliance reason, SHA-256 is the default. If you need 192-bit collision resistance, SHA-384. If you need 256-bit, SHA-512. Don’t pick SHA-384 over SHA-512 for marginal output-size reasons — both run the same internal work.

    Is my input uploaded?

    No. The generator runs the browser’s native SubtleCrypto.digest API. Text and files are processed locally — never sent to our servers.

    What’s HMAC-SHA-384 and when is it used?

    HMAC-SHA-384 is a keyed hash combining a secret key with the SHA-384 algorithm. Used for message authentication where you need to verify both data integrity and that the sender knew the key. Common in JWT signatures (JOSE algorithm HS384) and AWS Signature Version 4 for high-assurance API calls.

    Related tools and guides

     

  • Free SHA256 Hash Generator: Verify Files & Sign Data [2026]

    Free SHA256 Hash Generator: Verify Files & Sign Data [2026]

    TL;DR: A SHA-256 hash generator turns any text or file into a fixed 64-character hexadecimal fingerprint. Use it to verify downloaded files, sign data, hash email lists for ad-platform customer match, or generate API keys. Our free SHA-256 hash generator handles text and files up to 500MB, runs entirely in your browser via the Web Crypto API, and supports per-line mode for batch hashing.

    SHA-256 is the workhorse cryptographic hash function of the modern internet. It signs every TLS certificate, fingerprints every Bitcoin block, identifies every Git commit on most repositories, validates every download from official Linux mirrors, and authenticates every JWT token issued by any well-built API. Despite being almost 25 years old, no practical attack against SHA-256 has been demonstrated, which is why it remains the recommended algorithm for new cryptographic systems and the only algorithm Google Ads accepts for customer-match uploads.

    Our free SHA-256 hash generator computes the hash of any text or file directly in your browser using the Web Crypto API — the same standardized cryptographic primitive Chrome, Firefox, and Safari ship natively. No upload, no server, no rate limit. This guide explains exactly when you need a SHA-256 hash, how to verify file checksums on any operating system, and how to generate hashes in code when a one-off tool isn’t enough.

    What does a SHA-256 hash actually compute?

    SHA-256 takes any input — a single byte or a 1 GB ISO file — and produces a fixed 256-bit (32-byte) output, almost always written as a 64-character lowercase hexadecimal string like e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 (the canonical hash of an empty input). The function is one-way: trivial to compute forward, computationally infeasible to reverse.

    Three properties matter in practice:

    • Determinism. The same input always produces the same hash, on every device, in every programming language. The SHA-256 of hello world is b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9 — verifiable on your laptop, an iPhone, a server, a Bitcoin miner, anywhere.
    • Avalanche effect. Changing a single bit of input produces an output that differs in roughly half its bits. This makes tampering instantly detectable: even adding a trailing space to a file produces a completely different hash.
    • Collision resistance. Finding two different inputs that produce the same SHA-256 hash is computationally infeasible — current estimates put it at 2^128 operations, which is well beyond what any classical or quantum computer is expected to manage in this century.

    That last property is what separates SHA-256 from MD5 and SHA-1, both of which have practical collision attacks documented in the wild. For any new system that needs cryptographic security, SHA-256 is the floor.

    When you actually need a SHA-256 hash

    SHA-256 isn’t useful for everything — it’s overkill for non-security checksums and the wrong tool for password storage. Here are the legitimate use cases that drive most search traffic for “free SHA256 hash generator”, with the right algorithm in each row.

    Use case Right tool? Notes
    Verify downloaded ISO/installer integrity ✅ SHA-256 Standard published alongside Linux distros, Bitcoin, official software releases
    Customer-match upload to Google Ads / TikTok / LinkedIn ✅ SHA-256 Required by all three platforms; lowercase + trim emails first
    Sign or verify a JWT (JWS) token ✅ HMAC-SHA-256 (HS256) Use HMAC variant with a shared secret, not raw SHA-256
    Generate an API key or session token ✅ SHA-256 of crypto-random input Use Web Crypto’s getRandomValues + SHA-256 for a uniform 256-bit token
    Detect file corruption in storage / backup ✅ SHA-256 (or BLAKE3 if speed matters) Compare baseline hash vs current; mismatch = corruption or tampering
    Identify duplicate files across a directory ⚠ Use BLAKE3 or xxHash instead SHA-256 works but is slow for large dedup jobs; non-cryptographic hashes are 5-20× faster
    Store user passwords ❌ Use Argon2id or bcrypt SHA-256 is too fast — GPUs can brute-force billions of passwords per second
    Encrypt data so only you can decrypt it ❌ Use AES-GCM (encryption, not hashing) Hashing is one-way — there’s no decryption

    The two anti-uses matter as much as the right uses. SHA-256 for password storage was the standard advice in 2010 and is genuinely dangerous in 2026 — modern GPUs compute hundreds of millions of SHA-256 hashes per second, which makes any straight password hash crackable from a leaked database in hours. Use Argon2id (the OWASP recommendation as of 2025) or bcrypt with appropriate cost factor. SHA-256 is for integrity, not secrecy.

    How to verify a downloaded file’s SHA-256 checksum

    The most common reason people search for a SHA-256 generator is to verify the integrity of a downloaded file — checking that the ISO they pulled from a Linux mirror matches the official checksum the project published. Three steps regardless of OS.

    1. Find the official checksum. Project download pages publish a SHA-256 sum file (often named SHA256SUMS or checksums.txt) next to each download. Linux distros and Bitcoin Core provide these as standard.
    2. Compute the hash of your downloaded file. Use one command line tool, or drop the file into our browser-based generator.
    3. Compare the two strings character-by-character. Any difference, even a single hex digit, means the file was corrupted or replaced.

    macOS / Linux command line:

    # macOS — uses shasum (built in)
    shasum -a 256 ubuntu-24.04.iso
    
    # Linux — uses sha256sum (built in)
    sha256sum ubuntu-24.04.iso
    
    # Verify against a published SHA256SUMS file in one step
    sha256sum -c SHA256SUMS --ignore-missing 2>/dev/null | grep OK

    Windows PowerShell:

    Get-FileHash -Algorithm SHA256 ubuntu-24.04.iso
    
    # Compare against a known hash
    $expected = "1234abcd..."
    $actual = (Get-FileHash -Algorithm SHA256 ubuntu-24.04.iso).Hash
    if ($actual.ToLower() -eq $expected.ToLower()) { "MATCH" } else { "MISMATCH" }

    Browser (any OS, no install):

    Drop the file into the SHA-256 generator‘s file input. Hash appears in seconds. Copy and paste-compare against the published value.

    The browser approach has one big advantage on Windows: it doesn’t require Administrator rights or a terminal session, making it the right tool for users on locked-down corporate machines. Files up to 500 MB process locally without uploading anywhere.

    How to use the browser SHA-256 generator

    1. Open the SHA-256 hash generator
    2. For text: paste into the left panel — the hash updates as you type
    3. For files: click the right panel’s upload area, pick a file (up to 500 MB)
    4. Toggle output between hex (lowercase 64-character) and Base64 (44-character)
    5. For email lists: tick “Hash each line separately” — every non-empty line becomes its own hash. The “Normalize” option lowercases and trims, which is required by Google Ads and Meta customer-match uploads
    6. Click the copy icon to grab the hash for paste-comparison

    Everything runs locally via the browser’s Web Crypto API. The same generator handles MD5 (via SparkMD5 since Web Crypto doesn’t ship MD5), SHA-1, SHA-224, SHA-384, and SHA-512 — switch via the algorithm tabs.

    Generate SHA-256 hashes in code (Python, Node, OpenSSL, browser)

    For pipelines, scripts, or deeper integration, every modern environment ships SHA-256 in its standard library. The five lines you’ll actually use:

    OpenSSL (universal CLI):

    # Hash a string
    echo -n "hello world" | openssl dgst -sha256
    
    # Hash a file
    openssl dgst -sha256 ubuntu-24.04.iso
    
    # HMAC-SHA-256 with a key (for JWT-style signatures)
    echo -n "payload" | openssl dgst -sha256 -hmac "secret-key"

    Python:

    import hashlib
    
    # Text input
    hashlib.sha256("hello world".encode()).hexdigest()
    
    # File input — read in chunks for large files
    def hash_file(path: str) -> str:
        h = hashlib.sha256()
        with open(path, "rb") as f:
            for chunk in iter(lambda: f.read(65536), b""):
                h.update(chunk)
        return h.hexdigest()

    Node.js:

    import crypto from "node:crypto";
    import { createReadStream } from "node:fs";
    
    // Text
    const textHash = crypto
      .createHash("sha256")
      .update("hello world")
      .digest("hex");
    
    // File (streaming, memory-efficient for large files)
    function hashFile(path) {
      return new Promise((resolve, reject) => {
        const h = crypto.createHash("sha256");
        createReadStream(path)
          .on("data", (c) => h.update(c))
          .on("end", () => resolve(h.digest("hex")))
          .on("error", reject);
      });
    }

    Browser JavaScript (Web Crypto API):

    async function sha256Hex(text) {
      const data = new TextEncoder().encode(text);
      const buf = await crypto.subtle.digest("SHA-256", data);
      return [...new Uint8Array(buf)]
        .map((b) => b.toString(16).padStart(2, "0"))
        .join("");
    }
    
    await sha256Hex("hello world");
    // => "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9"

    All five approaches produce byte-identical output for the same input. If your CI pipeline computes a different SHA-256 than your laptop did for the same file, the most likely cause is a trailing newline (UNIX vs Windows line endings) or a hidden BOM in the file.

    Hashing email lists for Google Ads, Meta, and TikTok

    SHA-256 is the only hash algorithm Google Ads, TikTok Ads, and LinkedIn Ads accept for customer-match uploads. Meta accepts SHA-256 alongside the older MD5 and SHA-1, but strongly prefers SHA-256 for any new pipeline. The full platform-by-platform truth table is covered in our guide on hashing emails for ad-platform customer match.

    The two rules that decide whether your match rate is 70% or 5%:

    • Hash each row independently, never the whole file as one string. CSV exported with a trailing newline, hashed once, returns one hash for the entire file — useless for matching.
    • Lowercase and trim every email before hashing. Ad platforms normalize their internal lists this way; uploads that skip this step match at single digits because [email protected] and [email protected] produce different hashes.

    Our generator’s “Hash each line separately” mode handles both for you. Tick the box, paste your email list, and the output is one SHA-256 hash per line, ready to paste into a customer-match CSV. Normalize is on by default.

    SHA-256 vs MD5, SHA-1, SHA-3, BLAKE3 — which one and when?

    Algorithm Output size Status (2026) Use for
    MD5 128 bits Cryptographically broken (collisions trivial) Legacy compatibility only — fast non-security checksums
    SHA-1 160 bits Broken (SHAttered attack, 2017) Git history (until SHA-256 migration completes)
    SHA-256 256 bits Secure — no known practical attack Default for everything new — TLS, JWT, Bitcoin, customer match
    SHA-512 512 bits Secure — same family, larger output Higher-margin systems, faster than SHA-256 on 64-bit hardware
    SHA-3 / Keccak 224-512 bits Secure — different construction (sponge) Use when you specifically want non-Merkle-Damgård construction; rare
    BLAKE3 256 bits (extensible) Secure — newer (2020), no known attacks High-throughput dedup, content-addressed storage; 5-10× faster than SHA-256

    For 95% of cases — file integrity, signatures, ad-platform matching, content addressing — SHA-256 is the right answer. Reach for BLAKE3 only when you have a specific throughput requirement (think gigabytes per second per core) and your tooling supports it. Reach for SHA-3 only when a standards body specifically requires it.

    Common mistakes that produce the wrong SHA-256 hash

    • Trailing newline in your input. echo "hello" on UNIX appends a newline; echo -n "hello" doesn’t. The two produce completely different hashes. When verifying a checksum from a published source, copy the input exactly.
    • UTF-8 BOM in text files. Windows-generated text files often start with a hidden 3-byte BOM (EF BB BF). Strip it before hashing if your reference hash was computed without one.
    • Mixed line endings. A file with CRLF line endings hashes differently than the same content with LF endings. Convert with dos2unix or your editor’s line-ending setting before computing.
    • Hashing hex-encoded input as text. If the reference hash was computed over raw bytes but you’re feeding it the hex representation as a string, hashes won’t match. Convert hex to bytes first.
    • Confusing hex output with Base64 output. Both encode the same 256 bits but look different (64 hex chars vs 44 Base64 chars). Make sure your comparison string is the same encoding as your computed hash.

    When NOT to use SHA-256

    • For password storage. Use Argon2id (recommended) or bcrypt. SHA-256 is too fast — GPUs crack hundreds of millions of password hashes per second.
    • For deduplication of huge file sets. Use BLAKE3 or xxHash if you don’t need cryptographic security. Both are 5-20× faster.
    • To “encrypt” data so only the right person can read it. Hashing is one-way — there’s no recovery. Use AES-GCM for symmetric encryption, RSA or X25519 for asymmetric.
    • To prove someone has access to a secret. Use HMAC-SHA-256, not raw SHA-256. Raw hashing is vulnerable to length-extension attacks; HMAC isn’t.
    • As a non-cryptographic checksum where speed matters. CRC32 is sufficient for detecting accidental corruption and is much faster.

    Frequently asked questions

    Is SHA-256 still secure in 2026?

    Yes. No practical collision attack against SHA-256 has been demonstrated, and the function remains the recommended default for new cryptographic systems by NIST, IETF, and OWASP. Theoretical quantum-computing attacks against SHA-256 require Grover’s algorithm and reduce its effective security from 128 bits to 85 bits, which is still well above the practical-attack threshold.

    Can someone reverse a SHA-256 hash to recover the original input?

    Not in any meaningful sense. SHA-256 is a one-way function — there’s no decryption operation. For short or guessable inputs (common passwords, short numbers), a brute-force attack with a precomputed rainbow table can find the input. For unique high-entropy inputs (random API keys, file contents over a few KB), reversing is computationally infeasible.

    How long does SHA-256 take to compute on a large file?

    Modern CPUs hash at roughly 300-500 MB/sec per core for SHA-256. A 1 GB file takes 2-3 seconds; a 10 GB file takes 20-30 seconds. Browsers using the Web Crypto API match this performance because they delegate to the underlying native implementation. For files larger than a few GB, command-line tools are usually faster than browser tools because they stream the file rather than load it into memory.

    What’s the difference between SHA-256 and SHA-2?

    SHA-2 is a family of cryptographic hash functions standardized by NIST in 2001. SHA-256 is one specific member of that family — it produces a 256-bit output. Other members include SHA-224 (224-bit), SHA-384 (384-bit), and SHA-512 (512-bit). When someone says “SHA-2”, they often mean SHA-256 in practice because it’s by far the most widely deployed variant.

    Does the same input always produce the same SHA-256 hash?

    Yes, on every device and in every programming language. The SHA-256 algorithm is deterministic by definition. If your hash differs from a reference value, the cause is always the input — most commonly trailing whitespace, encoding differences (UTF-8 vs UTF-16), or line-ending conversion.

    Should I use SHA-256 or HMAC-SHA-256 for signing?

    HMAC-SHA-256 for any signing use. Raw SHA-256 is vulnerable to length-extension attacks where an attacker can append data to a signed message and produce a valid hash for the new content. HMAC wraps the hash function with a keyed construction that immunises against this. JWT’s HS256 algorithm is HMAC-SHA-256 specifically for this reason.

    Related tools and guides

     

  • Convert Emails to Hashed MD5 With MD5 Hash Generator: A 2026 Marketer’s Guide

    Convert Emails to Hashed MD5 With MD5 Hash Generator: A 2026 Marketer’s Guide

    TL;DR: To convert emails to hashed MD5: lowercase and trim each address, then compute MD5 per line. In 2026, Meta still accepts MD5 for Custom Audiences; Google Ads, TikTok, and LinkedIn require SHA-256. Our free browser-based MD5 generator handles per-line hashing with normalization built in — no uploads.

    Hashing email addresses to MD5 takes each address — [email protected] — and runs it through a one-way mathematical function that produces a fixed 32-character hexadecimal string like c160f8cc69a4f0bf2ea0b4b3c66f6db1. Ad platforms require hashing so they can match your customer list against their users without either side exposing raw emails in plaintext. You upload hashes, the platform hashes its own user list the same way, and the two sets are compared.

    Three rules decide whether your match rate is 72% or 4%: lowercase and trim every address before hashing, hash each line separately (not the whole file as one blob), and pick MD5 or SHA-256 based on which platform you’re feeding. Most match-rate disasters trace back to one of those three. This guide covers each in practical detail and hands you a private browser tool that does the work.

    Which ad platforms accept MD5 in 2026, and which demand SHA-256?

    Here is the current platform-by-platform truth table, verified against each vendor’s 2026 customer-matching documentation. Use this to decide which algorithm to hash with before you write a single line of code.

    Platform Accepted hash Notes
    Meta (Facebook, Instagram) Custom Audiences MD5, SHA-1, or SHA-256 All three accepted; SHA-256 strongly preferred
    Google Ads Customer Match SHA-256 only MD5 uploads rejected since the 2020 API migration
    TikTok Ads Matched Audience SHA-256 only Lowercase hex required
    LinkedIn Matched Audiences SHA-256 only Accepts hex; base64 rejected
    The Trade Desk SHA-256 (preferred), MD5 (legacy) MD5 still accepted for legacy seat pipelines
    X (Twitter) Tailored Audiences MD5 or SHA-256 Either works
    LiveIntent, Pinterest MD5, SHA-1, or SHA-256 SHA-256 recommended for new work
    Yahoo / Verizon Media SHA-256 only Since 2023 DSP migration

    The takeaway: if you’re hashing for exactly one platform, use what that platform asks for. If you’re building one file that might be uploaded to multiple platforms over its life, hash with SHA-256 — it’s accepted everywhere that accepts MD5, plus the four platforms that reject MD5 outright. MD5 survives mostly as a legacy format for Meta and a handful of DSPs with older pipelines.

    What hashing actually does to an email

    MD5 is a one-way function. Given the same input it produces the same 128-bit output every time, and it is computationally impractical to reverse. If you hash [email protected] on your laptop and Meta hashes the same address on theirs, both computers produce the identical 32-character string — that string becomes the common key for matching without either side ever seeing the other’s raw email list.

    One-way does not mean private. An MD5 hash of a known email is trivially lookup-able — rainbow tables for every major email provider exist — so hashing protects a list against casual eyeballing, not against a motivated attacker with a dictionary of emails. That’s why ad platforms treat hashed uploads as a regulatory-compliance layer, not as an anonymization guarantee. They still hold your raw customer list during match; they just discard the unmatched hashes afterward. The hashing step is primarily about keeping personally identifiable data off of HTTP request logs and cookie stores, not about cryptographically hiding it from the platform itself.

    How to normalize an email before hashing

    Normalization is the part that causes 80% of match-rate problems. An email address that looks identical to you and me may be stored in slightly different forms across your CRM, your email platform, and the ad network — any inconsistency produces a different hash and a miss.

    The required normalization steps, confirmed by every major ad platform’s docs, are exactly two:

    1. Trim all leading and trailing whitespace. A stray space in a CSV export is the single most common reason hashes don’t match.
    2. Lowercase the entire address. [email protected] and [email protected] refer to the same inbox, but their MD5 hashes differ completely.

    There are two optional steps that only apply if every system involved uses the same rule:

    • Gmail dot rule: Gmail treats [email protected] and [email protected] as the same inbox. If your customer list was captured with dots and the ad platform also dedupes by dots, stripping them raises match rate. If either side does not dedupe, do nothing — you will lower the match rate.
    • Plus addressing: [email protected] routes to [email protected] for most providers. Same rule as the Gmail dot: only strip if both sides of the match strip.

    Our rule of thumb: do only the mandatory trim-and-lowercase unless you have explicit documentation that the platform applies a specific canonicalization. Meta’s 2026 documentation, for example, performs the trim-and-lowercase itself on inbound hashes — don’t guess at additional normalization.

    The quickest way: hash a list in your browser

    The fastest path — and the only one that keeps your list off a third-party server — is our browser-based MD5 hash generator. Open the page, tick the “Hash each line separately” checkbox, paste your emails one per line, and copy the result. Normalization (lowercase + trim) is on by default because ad platforms require it. The entire operation runs in JavaScript inside your browser tab; no file leaves your device, and we never see the list.

    For SHA-256 uploads to Google Ads, TikTok, or LinkedIn, the workflow is identical — use our SHA-256 generator instead and check the same per-line box. Output pastes straight into a customer-match CSV.

    How to hash emails in Python, JavaScript, and SQL

    For anything larger than a few thousand rows, or for a repeatable pipeline, you want a script. Here’s the minimal correct implementation in each common language. Every example performs the mandatory lowercase-and-trim first.

    Python:

    import hashlib
    
    def hash_email_md5(email: str) -> str:
        normalized = email.strip().lower()
        return hashlib.md5(normalized.encode("utf-8")).hexdigest()
    
    with open("emails.csv") as f, open("hashed.csv", "w") as out:
        for line in f:
            email = line.strip()
            if email:
                out.write(hash_email_md5(email) + "\n")

    JavaScript (Node):

    import crypto from "node:crypto";
    import { readFileSync, writeFileSync } from "node:fs";
    
    const hashEmailMd5 = (email) =>
      crypto.createHash("md5").update(email.trim().toLowerCase()).digest("hex");
    
    const lines = readFileSync("emails.csv", "utf8").split(/\r?\n/).filter(Boolean);
    writeFileSync("hashed.csv", lines.map(hashEmailMd5).join("\n"));

    SQL (PostgreSQL with pgcrypto / BigQuery):

    -- PostgreSQL
    SELECT encode(digest(LOWER(TRIM(email)), 'md5'), 'hex') AS email_md5
    FROM customers
    WHERE email IS NOT NULL;
    
    -- BigQuery
    SELECT TO_HEX(MD5(LOWER(TRIM(email)))) AS email_md5
    FROM `project.dataset.customers`
    WHERE email IS NOT NULL;

    All three approaches produce byte-identical output. Running [email protected] through any of them yields c160f8cc69a4f0bf2ea0b4b3c66f6db1. If your pipeline produces a different hash for the same input, the most likely cause is missed normalization or a trailing newline character sneaking into the input.

    The three mistakes that tank match rates

    We’ve audited about 40 customer-match uploads across client engagements. The failure modes cluster tightly — if your match rate is under 40% on a list you’d expect to match well, one of these is almost certainly the reason.

    • Hashing the whole file instead of each line. CSV exported with a trailing newline, treated as one big string, MD5’d once — produces a single hash for the entire file. Match rate: 0%. Every line must be hashed independently.
    • Forgetting to lowercase. Many CRMs preserve user-entered casing. A list exported with [email protected]-style rows will produce hashes that don’t match anything on the platform side, which normalizes to lowercase internally. This typically drops a match rate from ~70% to ~8%.
    • BOM or encoding bytes in the input. Windows-generated CSVs often start with a UTF-8 BOM (EF BB BF). If your first row includes those bytes in the input to MD5, the first hash is useless. Strip with file.read().lstrip("\ufeff") in Python or equivalent.

    Validate your pipeline with a known input. [email protected] (lowercase, trimmed) hashes to c160f8cc69a4f0bf2ea0b4b3c66f6db1 — check one row’s output against this before uploading 100,000 rows blindly. Our MD5 tool produces the same reference output if you want a second check outside your codebase.

    When MD5 is the wrong choice

    Honest section: MD5 has been cryptographically broken since 2008, and though that doesn’t matter for ad-platform matching (where the goal is consistent deterministic output, not cryptographic secrecy), it does matter for a handful of adjacent use cases people sometimes reach for this tool to solve.

    • Never use MD5 to store user passwords. Collision attacks and precomputed rainbow tables make it trivial to reverse. Use bcrypt or argon2.
    • Never use MD5 as a security token. Session IDs, API keys, and CSRF tokens need a cryptographically secure random generator, not a hash of predictable input.
    • Don’t use MD5 for fresh ad-platform integrations. Unless you specifically need legacy Meta parity, start with SHA-256. You avoid the inevitable future migration and sidestep a handful of platforms that rejected MD5 years ago.
    • Don’t use MD5 if your list is tiny. Under 1,000 rows, your match is going to be noisy anyway — skip the hashing workflow and use whichever onboarding path your platform offers (most accept raw lists over HTTPS and hash server-side).

    Frequently asked questions

    Does Facebook still accept MD5 hashes for Custom Audiences?

    Yes, as of 2026 Meta accepts MD5, SHA-1, and SHA-256 for Custom Audience uploads. Their documentation strongly prefers SHA-256, and for any new pipeline SHA-256 is the right choice. MD5 remains supported for existing integrations that haven’t migrated.

    Can someone reverse-engineer my email address from its MD5 hash?

    Practically, yes — for any email they already guessed. Rainbow tables of common email addresses exist, and an attacker with a hashed list can check their dictionary against yours in seconds. MD5 hashing protects against casual inspection and keeps raw emails off of request logs; it does not protect against a determined adversary with a target email list.

    Do I need to lowercase emails before hashing for Google Ads?

    Yes, absolutely. Google Ads customer match documentation explicitly requires all inputs to be lowercased and trimmed before SHA-256 hashing. Uploads that skip this step match at single-digit percentages because Google’s internal list is already normalized.

    Is MD5 the same as encryption?

    No. MD5 is a one-way hash function, not encryption. Encryption is reversible with the right key; hashing is one-way by design — there is no “un-hash” operation. Two different inputs always produce hashes that differ in roughly half their bits, which is what makes hashing useful for matching without revealing the source.

    What’s the difference between MD5 and SHA-256 for emails?

    Both are deterministic one-way hash functions. MD5 produces a 32-character hex string (128 bits); SHA-256 produces a 64-character hex string (256 bits). SHA-256 is cryptographically secure against collision attacks; MD5 is not. For ad-platform matching, both work equally well — the choice comes down to which algorithm each platform accepts.

    Can I hash a list of emails without uploading them anywhere?

    Yes. Our MD5 generator and SHA-256 generator both run entirely in your browser using the Web Crypto API. Your email list never leaves your device, is never logged, and is never cached on our servers. This matters for GDPR compliance and for teams whose data-protection policies forbid third-party processing of customer PII.

    Related tools and guides