Skip to content

Hash generator and file checksum

Get checksums of text or a file, and compare them.

Text is hashed as UTF-8 bytes, exactly as typed (including any trailing newline).

Your files are open only in this tab. Nothing is uploaded.

Hashes

  • MD5 checksums only, not for security
    —
  • SHA-1 checksums only, not for security
    —
  • SHA-256
    —
  • SHA-384
    —
  • SHA-512
    —

How to use Hash generator

  1. Select input mode. Keep Hash source on Text to type or paste UTF-8 strings, or switch to File to drop a local file up to 1 GB.
  2. Inspect all five hashes. View MD5, SHA-1, SHA-256, SHA-384, and SHA-512 digests side by side as they compute.
  3. Enable HMAC if needed. Check HMAC with a secret key and enter your key to compute keyed SHA digests.
  4. Verify a download. Paste the publisher digest into Compare with a checksum to highlight the matching algorithm.

Everything runs in this browser tab. Nothing you paste or open is uploaded or logged, so it's safe for keys, tokens and private data.

SHA256, SHA512, and MD5 hash generator for text and files

Switching Hash source between Text and File calculates five digests in one pass: MD5, SHA-1, SHA-256, SHA-384, and SHA-512. Text inputs encode as UTF-8 bytes and update automatically after a 120 ms pause, while SHA family digests run natively through the MDN SubtleCrypto.digest() API.

Streaming large files in 4 MB slices up to 1 GB

Hashing a large ISO image or release archive in one memory buffer can crash a browser tab. In File mode, the worker reads files up to 1 GB in 4 MB slices inside dev.worker.ts, updating a live progress percentage bar with a Cancel button if you change your mind mid-stream.

For MD5, an incremental RFC 1321 hasher processes each slice through a fixed 64-byte block buffer without copying the entire file into RAM. If you need to bundle multiple build artifacts into a single archive before computing its release digest, zip files and folders locally first.

Comparing expected SHA-256 checksums without uploading

Verifying a downloaded installer requires comparing its computed digest against the publisher’s reference string. Paste any expected value into Compare with a checksum and the matcher strips whitespace, ignores uppercase or lowercase differences, and removes prefixes such as sha256:.

When a match is found, the corresponding row highlights and displays a confirmation label such as Matches SHA-256.. If none of the five computed digests match, an inline warning alerts you immediately so corrupted or tampered downloads are caught before execution.

MD5 vs SHA256 and SHA-384 integrity verification

Choosing the right algorithm depends on whether the goal is guarding against accidental transmission errors or verifying cryptographic authenticity. While MD5 (128 bits) and SHA-1 (160 bits) remain common in legacy manifests, modern software distribution relies on the SHA-2 family defined in the NIST FIPS 180-4 Secure Hash Standard.

When MD5 and SHA-1 remain acceptable for accidental corruption

Both MD5 and SHA-1 carry an explicit checksums only, not for security label in the output list because practical collision attacks can forge two different files with identical digests. They are still useful for deduplicating local backups or verifying legacy checksum files where no adversary is involved.

SHA-256, SHA-384, and SHA-512 digest lengths under FIPS 180-4

SHA-256 produces a 64-character hex string (256 bits) and serves as the default standard for Linux ISOs, Docker layers, and Git commits. SHA-384 (384 bits) and SHA-512 (512 bits) offer even wider collision resistance and are widely used in Subresource Integrity (SRI) tags and high-assurance release pipelines.

Algorithm Digest length Hex characters HMAC supported Primary use case
MD5 128 bits 32 No Legacy file deduplication & accidental corruption checks
SHA-1 160 bits 40 Yes Legacy Git object IDs & non-security checksums
SHA-256 256 bits 64 Yes Download verification, API webhooks, and release manifests
SHA-384 384 bits 96 Yes Subresource Integrity (SRI) & TLS certificates
SHA-512 512 bits 128 Yes High-assurance binary verification & 64-bit platforms

If a deployment pipeline or SRI attribute expects Base64 rather than hexadecimal output, encode binary digests as Base64 strings after inspecting the hex digest.

How does the HMAC secret key calculator work?

Checking HMAC with a secret key switches the calculator from unkeyed digests to keyed Hash-based Message Authentication Codes using the MDN SubtleCrypto.sign() HMAC Reference. Typing a shared secret into Secret key imports the UTF-8 key via crypto.subtle.importKey and signs your text or file stream locally.

Signing payloads with HMAC-SHA-1, SHA-256, SHA-384, and SHA-512

Webhook providers such as Stripe, GitHub, and Slack authenticate HTTP callbacks by computing HMAC-SHA256 over the raw request body using a webhook signing secret. Testing those signatures inside your browser avoids pasting production secrets into external web servers.

To generate a strong signing key before configuring a new webhook integration, create high-entropy authentication secrets in your browser and paste the result into Secret key.

Why MD5 is omitted when a secret key is active

Because MD5 is cryptographically weak for authentication and unsupported by SubtleCrypto HMAC signing, the MD5 row displays Not available with a key whenever HMAC with a secret key is checked with a non-empty key.

Tip: Toggle Uppercase when comparing against Windows CertUtil outputs or legacy manifest files that print hex digests in capital letters; the copy button automatically copies whichever case is displayed.

Troubleshooting UTF-8 text and terminal echo newline differences

One of the most frequent surprises when checking text hashes is getting a different SHA-256 digest in the browser than from a terminal command. Running echo "hello" | sha256sum appends a trailing 0x0A newline byte, whereas the Text box hashes the exact five bytes of hello via TextEncoder.

If you want your terminal output to match the browser digest, run printf '%s' "hello" | sha256sum so no newline is added, or press Enter at the end of the Text box if your target string includes a trailing newline. Every line ending (\n vs \r\n), space, and multi-byte Unicode character changes the resulting hash completely.

When generating unique request IDs or correlation tokens alongside webhook HMAC signatures, use the UUID generator to create random v4 or time-ordered v7 identifiers locally. Because every digest, key import, and checksum comparison runs in your browser tab, API keys, configuration files, and unreleased binaries stay private on your device with zero network uploads.

Questions

Why does hashing text here differ from terminal echo?

Running echo hello in a shell appends a hidden newline byte (\n) before hashing, whereas this text box hashes the exact UTF-8 bytes you typed without adding a trailing newline. Use printf '%s' hello in your terminal to match.

Are MD5 and SHA-1 still safe for checksums?

MD5 and SHA-1 are fine for detecting accidental download corruption or bit rot when comparing against a trusted reference. Never rely on them to defend against intentional tampering or forgery because collision attacks exist for both.

Should I hash passwords with SHA-256 or SHA-512?

Neither. Fast general-purpose hashes like SHA-256 and SHA-512 are designed for high throughput, which makes brute-force cracking practical on GPUs. Use slow, salted memory-hard algorithms such as Argon2id or bcrypt for password storage.

Can you reverse a hash or convert MD5 to SHA-256?

No. Cryptographic hash functions are one-way mathematical mappings that discard input structure, so you cannot recover the original text or translate an MD5 digest into SHA-256 without hashing the original bytes again.

Why is HMAC unavailable for MD5 in this tool?

The browser Web Crypto SubtleCrypto interface implements HMAC only for SHA-1, SHA-256, SHA-384, and SHA-512, and MD5 is cryptographically broken for authentication. When a secret key is active, MD5 displays Not available with a key.

Is my file uploaded when calculating a checksum?

No. Both text hashing and 4 MB chunked file streaming run inside your browser using local JavaScript and Web Crypto APIs, so sensitive archives and keys never leave your device.

Updated