Home / Free tools / Text & Data / Hash Generator

Hash Generator

Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text or file, optionally with an HMAC key, and compare them with a checksum you were given. Everything runs on your device.

Runs in your browser. Nothing you paste or choose is uploaded or stored.

What this hash generator does

A hash function turns any amount of data into a short, fixed-length fingerprint. The same input always gives the same fingerprint, and a change of even one bit changes it completely. That makes hashes useful for checking that a file arrived intact, for comparing two files without opening them, for spotting duplicates and, with a secret key, for signing messages. This page computes five common ones for text you type or a file you choose, shows them side by side, and can compare them with a checksum you were given.

The algorithms are MD5, SHA-1, SHA-256, SHA-384 and SHA-512. The SHA family is computed by your browser's Web Crypto API. MD5 is not provided by Web Crypto, so it is calculated by code on this page and checked against the test vectors in RFC 1321 and against a reference implementation. The tool offers no other algorithm. Nothing is uploaded, and the page works with the network switched off once it has loaded.

How to use it

  1. Type or paste text, or choose a file of up to 200 MB. Text is converted to bytes as UTF-8, and the hashes update as you type.
  2. Read the five hashes. Choose hexadecimal or Base64, and lower or upper case for hex. Each row has a Copy button.
  3. To verify a download, paste the published checksum into the compare box. A match names the algorithm that produced it. The box tolerates spaces, colons and a leading label such as SHA256:.
  4. For an HMAC, tick the box and enter the secret key. The same five algorithms are used as HMAC-MD5, HMAC-SHA-1 and so on.

Worked example

Press Load an example to hash the text hello world with no trailing newline. The MD5 is 5eb63bbbe01eeed093cb22bb8f5acdc3, the SHA-1 is 2aae6c35c94fcfb415dbe95f408b9ce91ee846ed, and the SHA-256 is b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9. If you add a newline after the text, all values change, which is the most common reason two tools disagree. As an HMAC example, the key key and the message The quick brown fox jumps over the lazy dog give an HMAC-SHA-256 of f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8.

Which algorithm should I use?

For passwords, none of these is the right tool. Password storage needs a deliberately slow, salted function such as Argon2, scrypt or bcrypt. If you want a strong password in the first place, the password generator makes random ones in your browser.

Where it helps

What the tool does not do

It hashes data held in memory, so very large files are not supported: the limit is 200 MB. It cannot reverse a hash or look one up, and it does not offer algorithms such as SHA-3, BLAKE2 or CRC32. A hash only proves that two inputs match, not who made them. To prove origin, use an HMAC with a shared secret or a digital signature. If the page reports that the Web Crypto API is unavailable, your browser is blocking it on this page, which normally happens only on insecure connections or very old browsers. MD5 still works in that case.

Questions

Which algorithms does this tool support?

MD5, SHA-1, SHA-256, SHA-384 and SHA-512, each also as an HMAC with a secret key. No other algorithms are offered. SHA-256 and the larger SHA-2 hashes use your browser's built-in Web Crypto API, and MD5 is calculated by code on this page.

Is MD5 or SHA-1 safe to use?

Not for security. Both are broken for collision resistance and must not be used for signatures, certificates or storing passwords. They are still common for checksums that detect accidental corruption, which is why they are included. For anything security-related, use SHA-256 or stronger, and a purpose-built password hash for passwords.

Can I use it to hash passwords?

Do not store passwords as plain SHA-256 or MD5 hashes. They are too fast to calculate, so they are easy to guess at scale. Use a slow, salted password hash such as Argon2, scrypt or bcrypt in your application. This tool is for checksums and for checking values.

How do I verify a downloaded file?

Choose the file here, then paste the checksum that the publisher lists into the compare box. If the algorithm and value match, the tool shows a match. The publisher must provide the checksum through a trusted channel, otherwise an attacker could change both.

What is an HMAC?

A keyed hash that proves a message came from someone who knows the secret key and was not changed. It is used to sign webhook payloads and API requests. Tick the HMAC option, enter the key, and the five values become HMAC values.

Is my text or file uploaded?

No. The hashing happens in your browser. Neither the text, the key nor the file is sent anywhere or stored, and the text and key are not saved in the page address.

Why do I get a different result from another tool?

Usually the input differs: a trailing newline, different line endings or another text encoding. This tool hashes text as UTF-8 exactly as typed. Hash the same file instead of retyped text to avoid these differences.

Google, Merchant Center, YouTube, LinkedIn, Indeed, Glassdoor and Shopify are trademarks of their owners. Van Born Labs is independent and not affiliated with them. Google's own help pages are the final word on its rules.