Developer Tools
Hash generator.
Generate SHA-1, SHA-256, and SHA-512 hashes from text or a file. Runs entirely in your browser using the native SubtleCrypto API: nothing leaves the page.
How to generate a hash
- Type or paste text into the box, or choose a file to hash instead.
- Press Generate hashes.
- Copy the SHA-1, SHA-256 or SHA-512 value you need.
What a hash is for
A hash is a short fixed-length fingerprint of some data. The same input always produces the same hash, and a change of even one character produces a completely different one. People use hashes to confirm that a downloaded file matches the publisher's checksum, to detect accidental changes, to deduplicate files and to build other security features. SHA-256 and SHA-512 are the usual choices today. SHA-1 is included for compatibility with older systems but should not be used where security matters, because collisions can be created deliberately.
Hashing is not encryption. You cannot turn a hash back into the original text, but short or guessable inputs can be found by trying candidates, so never rely on a plain hash to protect a password. Use a purpose-built password hashing scheme for that.
Which algorithm to choose
For a new project, pick SHA-256 unless a specification tells you otherwise. SHA-512 is a reasonable alternative when you want a longer digest. MD5 and SHA-1 are only for matching older checksums, because collisions can be manufactured for both. If you need to prove that a message came from someone who holds a secret key, a plain hash is not enough and you want an HMAC instead.
Your text and files stay local
Hashes are computed by your browser's built-in cryptography inside a sealed frame that cannot make network requests. The text or file never leaves your device. If you select a file, it takes precedence over the text box. The advertising on this page sits outside the frame and cannot see what you enter.
- To verify a download, hash the file here and compare the result with the checksum the publisher lists.
- Line endings and trailing spaces change the hash of text, so paste exactly what you mean to hash.