Hash Generator

Generate SHA-1, SHA-256, SHA-384, and SHA-512 hashes for text or a file, all in your browser. MD5 isn't offered — browsers don't provide it natively, and hand-rolling a hash algorithm isn't worth the risk.

0 chars0 lines0 bytes

…or drop a file to hash

Drag a file here, or

Hashes will appear here…

What is Hash Generator?

Hash Generator is a browser-based tool that computes cryptographic hashes — SHA-1, SHA-256, SHA-384, and SHA-512 — for pasted text or a dropped file, showing all four at once. A hash is a fixed-length fingerprint derived from input data: the same input always produces the same hash, and even a one-character change produces a completely different result.

Hashes are everywhere in software: verifying that a downloaded file was not corrupted or tampered with, storing password verifiers, generating cache keys and content identifiers, detecting duplicate files, and checking data integrity. They are one-way — you cannot reverse a hash back into the original data — which is exactly what makes them useful for these purposes.

This tool uses the browser's built-in Web Crypto API, so every hash is computed locally. MD5 is intentionally not offered, because browsers do not provide it natively and it is cryptographically broken. Your text and files are never uploaded — hashing a private file leaves it entirely on your machine.

Why use Hash Generator?

The most common everyday use is verifying downloads. When a project publishes a SHA-256 checksum alongside a file, you can drop the downloaded file here and compare the computed hash to the published one. If they match, the file is intact and unmodified; if not, it was corrupted or tampered with. Doing this in the browser means the file never leaves your computer.

Seeing all four SHA variants at once saves time. Different systems specify different algorithms — a package registry might use SHA-512 while a Git-style system uses SHA-1 — and having every result displayed together means you never have to re-run the tool for a different algorithm.

Local hashing is a genuine privacy and security win. Uploading a sensitive file to an online hashing service exposes its contents to that server. This tool computes everything with the browser's native crypto, making zero network requests, which you can confirm in the Network tab — so you can safely hash confidential documents, keys, or archives.

Features

  • Computes SHA-1, SHA-256, SHA-384, and SHA-512 simultaneously
  • Hash pasted text or a dropped file
  • Uses the browser's native Web Crypto API
  • Per-algorithm one-click copy of the hex digest
  • Shows file name and size when hashing a file
  • Handles large files without freezing the interface
  • Only shows the result for the most recent input
  • Runs entirely in your browser — no uploads, works offline

How to use Hash Generator

  1. Type or paste text into the input panel to hash it, or drag and drop a file onto the drop zone.
  2. All four hashes — SHA-1, SHA-256, SHA-384, and SHA-512 — appear together in the results panel.
  3. To verify a download, compare the relevant computed hash against the checksum the publisher provided.
  4. Click the copy button next to any algorithm to copy that hex digest to your clipboard.
  5. Change the text or drop a different file at any time to recompute the hashes.

Example 1 — Hash a short string (SHA-256)

Paste text to see its SHA-256 digest, a 64-character hexadecimal fingerprint.

Input

hello

Output

2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824

Example 2 — Verify a file download

Drop a downloaded file and compare its SHA-256 against the publisher's checksum to confirm integrity.

Input

installer.dmg (dropped file)

Output

SHA-256: e3b0c44298fc1c149afbf4c8996fb924... (compare to published value)

Common Mistakes

  • Confusing hashing with encryption: hashing is one-way and cannot be reversed, so it is not a way to hide data you need to recover. Encryption is reversible with a key; a hash is a fingerprint, not a locked box.
  • Using SHA-1 for security: SHA-1 is broken for collision resistance and should not be used to protect against tampering. It is included here for compatibility with legacy systems only — use SHA-256 or stronger for security purposes.
  • Expecting MD5: MD5 is not offered because browsers do not provide it and it is cryptographically broken. If a system still requires MD5, that is a signal the system itself needs updating.
  • Comparing hashes case-sensitively by eye: hex digests may be shown in upper or lower case by different tools. Compare them case-insensitively, or normalize the case before comparing.
  • Hashing text when you meant to hash a file (or vice versa): pasting a file's path or a base64 blob as text hashes that text, not the file's bytes. Drop the actual file to hash its real contents.
  • Assuming a matching hash proves authenticity: a matching checksum proves the file is identical to the one whose hash you were given, but only a signed hash from a trusted source proves who produced it. A hash alone does not authenticate the publisher.

Developer Tips

  • Use SHA-256 as your default for integrity checks and content addressing — it is fast, widely supported, and has no known practical weaknesses.
  • When verifying a download, copy the publisher's checksum and compare it character-for-character (case-insensitively) with the computed value rather than eyeballing the first few digits.
  • Because hashing runs locally, you can safely fingerprint confidential files to detect changes or duplicates without ever exposing their contents to a server.
  • Remember that a salt is what makes password hashing safe — a bare hash of a password is vulnerable to lookup tables, so never store raw SHA hashes of passwords in production.
  • The same input always yields the same hash, which makes hashes ideal cache keys and content identifiers; a changed hash reliably signals changed content.

Frequently Asked Questions

What is a cryptographic hash?
A cryptographic hash is a fixed-length fingerprint computed from input data of any size. The same input always produces the same hash, while even a tiny change to the input produces a completely different, unpredictable output. Hashes are one-way, meaning you cannot reverse the fingerprint back into the original data. These properties make them ideal for verifying integrity, detecting changes, addressing content, and building password verifiers.
Is hashing the same as encryption?
No. Encryption is reversible: with the correct key, encrypted data can be decrypted back to the original. Hashing is one-way and has no key — you cannot recover the input from its hash. Encryption protects confidentiality of data you need to read again later; hashing produces a fingerprint used to verify or identify data. Using a hash to "hide" data you later need to retrieve is a fundamental mistake, because there is no way to get the original back.
Why is MD5 not available?
MD5 is not offered for two reasons. First, browsers do not include MD5 in the native Web Crypto API, so providing it would require hand-rolling the algorithm, which is error-prone. Second, MD5 is cryptographically broken — attackers can produce different inputs with the same MD5 hash, so it must not be used for security. If a system still depends on MD5, that is a sign the system should be modernized to use SHA-256 or a stronger algorithm.
Are my files uploaded when I hash them?
No. All hashing is done locally in your browser using the built-in Web Crypto API. When you drop a file, its bytes are read into memory and hashed on your device — nothing is sent to a server, logged, or stored. You can verify this by opening your browser's Network tab while hashing a file: there are zero outbound requests, and the tool continues to work even offline. This makes it safe to hash confidential files.
Which algorithm should I use?
For virtually all new uses, choose SHA-256: it is fast, universally supported, and has no known practical weaknesses. SHA-384 and SHA-512 provide larger digests and are appropriate when a system specifically requires them or when you want extra margin. Avoid SHA-1 for anything security-sensitive, since it is broken for collision resistance; it is included here only for compatibility with older systems that still expect it.
Can I use this to verify a downloaded file is genuine?
Yes, with a caveat. Dropping the file and comparing its computed hash to the checksum the publisher provides confirms the file is byte-for-byte identical to the one they hashed — so it was not corrupted or altered in transit. However, this only proves integrity, not authenticity: it assumes you obtained the published checksum from a trustworthy source. For full authenticity, the checksum should itself be signed by the publisher's trusted key.