Hash Generator
Generate hashes for text using SHA256, SHA1, and MD5.
How to use the Hash Generator
A cryptographic hash converts any text into a fixed-length fingerprint. This tool generates SHA-256 and SHA-1 hashes in your browser using the native Web Crypto API — nothing is sent to a server.
- 1
Paste or type your text
Enter the text you want to hash in the textarea. It can be anything: a password candidate, a message to verify, or any string you need a fingerprint for.
- 2
Click SHA256 or SHA1
SHA-256 produces a 64-character hex digest and is the recommended choice for most uses. SHA-1 produces a 40-character digest and is faster but considered cryptographically weak.
- 3
Copy the hash
Use the Copy button next to the result field to copy the hash to your clipboard, ready to paste into your application, database, or documentation.
Frequently asked questions
What is a cryptographic hash?
A hash function takes any input and produces a fixed-length output called a digest. Even a one-character change to the input completely changes the output, making hashes ideal for detecting tampering and verifying data integrity.
Is SHA-256 better than SHA-1?
Yes. SHA-1 is cryptographically broken — researchers demonstrated practical collision attacks in 2017. SHA-256 (part of the SHA-2 family) is still considered secure and is the standard for code signing, TLS certificates, and blockchain applications.
Can I reverse a hash to get the original text?
No. Hashing is a one-way function by design — you cannot mathematically derive the input from the output. This is what makes hashes useful for password storage: the original password never needs to be saved.
What is a hash collision?
A collision occurs when two different inputs produce the same hash output. SHA-256 has no known practical collisions. SHA-1 has had collisions demonstrated, which is why it should not be used for security-sensitive tasks like digital signatures.
How do apps use hashes for passwords?
A secure application stores your password's hash, not the password itself. On login it hashes what you type and compares the digests. If they match, access is granted — without ever storing or transmitting the raw password.
What is a rainbow table attack?
A rainbow table is a precomputed lookup of common inputs and their hashes. Attackers use them to reverse hashes of weak passwords. Salting — adding a random value to each password before hashing — defeats rainbow table attacks by making every hash unique.