Skip to content
MagicWebBox
Sign in

Hash generator

Compute SHA-1, SHA-256, SHA-384 and SHA-512 hashes of a text or a file

Text

Hashes

Type some text or choose a file.

About this tool

The hash generator computes SHA-1, SHA-256, SHA-384 and SHA-512 hashes of a text or a file in one go, displayed in hexadecimal. It is mostly used to verify a download against the checksum published by the vendor, to tell whether two files are identical, or to get the hash of a string for a test or a script.

Text is encoded as UTF-8 before hashing, as most programming languages do. The optional expected hash field compares your value with all four results, ignoring case and surrounding spaces, and tells you which algorithm matches. Hashing runs through the browser's Web Crypto API: the file you choose is read locally and is never uploaded anywhere.

How to use it

  1. Type your text in the Text box, or use “Or choose a file”.
  2. Read the four hashes, computed automatically.
  3. To verify a checksum, paste it into “Expected hash (optional)”.
  4. Click the copy icon next to the algorithm you need.

Frequently asked questions

Why is MD5 not available?

The tool relies on the browser's Web Crypto API, which only provides algorithms from the SHA family, and MD5 is not one of them. For integrity checks, use SHA-256; SHA-1 is no longer considered secure.

Is my file uploaded to a server?

No. Your browser reads the file and computes the hash with crypto.subtle.digest, with no network request. The whole file is loaded into memory, so a file of several gigabytes may take a while to process.

Why does my hash differ from the one in my terminal?

Usually because of a trailing newline: echo adds one that the text box may not contain. Use echo -n or printf, or pick the file directly so that exactly the same bytes are hashed.

Can I use SHA-256 to store passwords?

No. SHA hashes are designed to be fast, which makes brute-force attacks easier. For passwords, use a slow, salted algorithm such as Argon2, bcrypt or scrypt. This tool is meant for checking data integrity.