Hash Generator

A hash function turns any input into a fixed-length fingerprint. Change one character of the input and the output changes completely, which is what makes hashing useful for verifying that a file, a message or a record has arrived exactly as it left. Comparing two hashes is far faster and more reliable than comparing two large files byte by byte.

The everyday use is integrity checking. Software projects publish a checksum next to a download so you can confirm the file you received is the file they published rather than a corrupted or tampered copy. Developers hash content to detect changes cheaply, and systems use hashes to deduplicate storage.

Choose the algorithm deliberately. MD5 and SHA-1 are broken for security purposes because collisions can be manufactured, so they are acceptable only as non-adversarial checksums. Use SHA-256 for anything where integrity matters. And note that hashing is not encryption: it is one-way by design and cannot be reversed, which is exactly why passwords are stored as hashes rather than as recoverable text.

How it works

SHA-1, SHA-256, SHA-384 and SHA-512 use the Web Crypto subtle.digest API, the same primitive the browser uses for TLS. MD5 is computed with a dedicated library because it is obsolete and not in Web Crypto.

File hashing reads the selected file into an ArrayBuffer and feeds the same digest function, so multi-gigabyte files can be checked without any upload.

HMAC signs the message with a secret key using subtle.sign, producing a keyed hash that proves both integrity and authenticity when the recipient shares the key.

Verify mode recomputes the hash of the input and compares it character by character with the expected value, returning a clear match or mismatch.

How to use the Hash Generator

  1. Paste the text you want to fingerprint into the input area.
  2. Select the algorithm, preferring SHA-256 unless you must match an existing MD5 checksum.
  3. Generate the hash.
  4. Compare it character by character with the expected value.
  5. Copy the hash into your documentation, ticket or verification record.

Examples

Common mistakes

Frequently asked questions

Can a hash be reversed?

No. Hashing is one-way. Short or common inputs can be found by looking them up in precomputed tables, which is why password hashing adds a salt and deliberate slowness.

Which algorithm should I use?

SHA-256 for anything security relevant. MD5 and SHA-1 remain useful only as quick non-adversarial checksums.

Why do two identical looking strings hash differently?

Almost always an invisible difference: a trailing space, a line ending, or a different character encoding.

Is this suitable for storing passwords?

No. Password storage needs a dedicated slow algorithm such as bcrypt or Argon2 with a unique salt per user.

Can I hash a file without uploading it?

Yes. The file is read into memory in your browser and hashed locally; it is never transmitted to any server.

What is the verify mode for?

Paste an expected checksum, choose the matching algorithm, and the tool tells you clearly whether the computed hash matches — useful for confirming a download against a published checksum.

Read our related guide for more on getting the most from the Hash Generator.

Updates

Last updated: November 8, 2026

Changelog: Added SHA-384 and SHA-512, in-browser file hashing, verify mode, and HMAC with a secret key (November 2026).

SwiftMultiTool — free online tools for everyone. Home · Blog · About · FAQ · Contact