Skip to main content

Hash Generator

Generate SHA-1, SHA-256, SHA-384 and SHA-512 hashes from any text.

Built and tested by Muhammad Irfan Liaqat · Updated

Hash Generator: key facts

  • Generates SHA-1, SHA-256, SHA-384 and SHA-512 hashes of text at the same time
  • Text is encoded as UTF-8 and hashes are shown in lowercase hexadecimal
  • Uses the browser's built-in Web Crypto API
  • Text only: it does not hash files, generate MD5 or compute HMACs

What a hash is and which algorithm to use

Type or paste text and the hash generator shows its SHA-1, SHA-256, SHA-384 and SHA-512 hashes at the same time, using your browser's Web Crypto API. A hash is a fixed-length fingerprint of data: the same input always gives the same hash, and changing one character gives a completely different one.

Hashes are used to check that data has not changed and to create identifiers. SHA-256 is the usual choice. SHA-1 is included for older systems but is broken for security use, since researchers produced two different files with the same SHA-1 hash in 2017. Fast hashes like these should not be used on their own to store passwords; password storage needs a slow, salted algorithm such as Argon2, bcrypt or scrypt. This tool hashes text encoded as UTF-8, not files, and nothing you type is sent anywhere.

How to generate a SHA-256, SHA-1 or SHA-512 hash

  1. 1Type or paste the text you want to hash
  2. 2Read the SHA-1, SHA-256, SHA-384 and SHA-512 values
  3. 3Click Copy next to the hash you need

Frequently Asked Questions

Which hash algorithm should I use?
SHA-256 for most purposes. SHA-384 and SHA-512 give longer hashes where a standard requires them. Use SHA-1 only to match an older system, because it is no longer considered secure.
Can a hash be reversed?
No. Hash functions are one-way. Short or common inputs can still be guessed by hashing candidates and comparing, which is why passwords need slow, salted hashing.
Why is there no MD5?
The browser's Web Crypto API, which this tool uses, does not offer MD5 because it has been broken for many years. Use SHA-256 instead where you can.
Why does my hash differ from another tool's?
Usually the input differs in a way you cannot see, such as a trailing space or line break, or a different text encoding. This tool hashes exactly what is in the box, encoded as UTF-8.
How do I get the SHA-256 checksum of a file?
This tool hashes text, not files. On Windows run certutil -hashfile file.zip SHA256, on macOS shasum -a 256 file.zip, and on Linux sha256sum file.zip.
How long is a SHA-256 hash?
256 bits, written as 64 hexadecimal characters. SHA-1 is 40 characters, SHA-384 is 96 and SHA-512 is 128, whatever the length of the input.
Should I hash passwords with SHA-256?
No. SHA-256 is fast, which makes guessing attacks fast too. Store passwords with a slow, salted algorithm such as Argon2, bcrypt or scrypt.

Related Tools

Guides