How to use it
- Type or paste your text. The five hashes update immediately.
- Choose the output format. Hexadecimal is the usual way to write a hash; Base64 is common in web headers and APIs.
- If your data is bytes rather than text, switch “Input is” to Hex bytes and paste the bytes as hexadecimal.
- Press Copy next to the hash you need, or paste a hash you already have into the compare box to see which algorithm it matches.
When to use it
- Checking whether two pieces of text are identical without comparing them by eye.
- Producing a SHA-256 fingerprint for a configuration value, an API payload or a test fixture.
- Comparing a hash you were given with one calculated from the same text, using the match box.
- Seeing how hashes behave: change one letter and the whole hash changes.
What a hash function does
A hash function turns any amount of data into a fixed-length fingerprint. The same input always gives the same fingerprint, a tiny change gives a completely different one, and you cannot work backwards from the fingerprint to the input. That makes hashes useful for checking that data has not changed, for fingerprinting files and for building other security tools.
The text you type is first converted to bytes using UTF-8, the encoding used almost everywhere on the web. Those bytes are then passed to the algorithm. SHA-1, SHA-256, SHA-384 and SHA-512 are calculated by your browser’s built-in Web Crypto code. MD5 is not offered there, so this page includes its own implementation, which is checked against known test vectors.
Worked example. The SHA-256 hash of abc is:
ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad
Change one letter to abd and the hash becomes a52d159f262b2c6ddb724a61840befc36eb30c88877a4030b65cbe86298449c9. About 122 of the 256 bits differ, which is close to half. This “avalanche effect” is why a hash can reveal even a one-character change.
The hash of empty input is also defined: SHA-256 of nothing is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 and MD5 of nothing is d41d8cd98f00b204e9800998ecf8427e.
Which algorithm should you use?
For anything where an attacker might try to forge data, use SHA-256 or a longer SHA-2 hash. MD5 collisions were demonstrated in the mid-2000s and the first public SHA-1 collision followed in 2017, so a clever attacker can craft two different files with the same MD5 or SHA-1 hash. NIST has set a deadline of the end of 2030 to phase SHA-1 out. MD5 and SHA-1 still work for catching accidental corruption, such as a download that did not finish, and many older systems publish them for that reason.
Hashes are not for storing passwords
Plain hashes are fast by design, which helps attackers who try billions of guesses per second against a stolen list. Passwords should be stored with a slow, salted password-hashing function such as Argon2id, scrypt or bcrypt, as OWASP recommends.
| Algorithm | Output size | Hex length | Status for security use |
|---|---|---|---|
| MD5 | 128 bits | 32 | Broken: collisions are easy to create. Checksums only. |
| SHA-1 | 160 bits | 40 | Broken: collisions demonstrated. NIST is phasing it out by 2030. |
| SHA-256 | 256 bits | 64 | Current. A good default for integrity and signatures. |
| SHA-384 | 384 bits | 96 | Current. Truncated SHA-512 variant. |
| SHA-512 | 512 bits | 128 | Current. Often faster than SHA-256 on 64-bit processors. |
Frequently asked questions
What is the difference between MD5 and SHA-256?
Both turn data into a fixed fingerprint. MD5 produces 128 bits and has known practical collision attacks, so it should not be trusted against an attacker. SHA-256 produces 256 bits and has no known practical attacks, which is why it is the usual default.
Can a hash be decrypted or reversed?
Not mathematically, because information is thrown away. Attackers instead guess inputs and compare hashes, which works quickly for short or common inputs such as simple passwords. Long random inputs are not practical to guess.
Is MD5 still safe to use?
It is fine for catching accidental corruption, but not for anything an attacker could tamper with. If you are choosing a hash today, choose SHA-256 or stronger.
Why is my hash different from another tool’s?
The usual causes are an extra space or line break, different line endings, a different text encoding, or comparing uppercase to lowercase hex. This tool hashes your text as UTF-8 exactly as typed. Hex letters are case-insensitive.
Should I hash passwords with SHA-256 before storing them?
No. Use a purpose-built password hashing function such as Argon2id, scrypt or bcrypt. A fast hash lets an attacker test enormous numbers of guesses per second.
Is it safe to paste private text here?
The text is hashed in your browser and is not sent anywhere. As a general habit, avoid pasting real secrets into any web page when you do not need to.
Sources and further reading
- RFC 1321: The MD5 Message-Digest Algorithm (opens in a new tab) – the MD5 specification and test suite
- RFC 6151: Updated Security Considerations for MD5 (opens in a new tab) – why MD5 is unsuitable where collisions matter
- NIST FIPS 180-4: Secure Hash Standard (opens in a new tab) – SHA-1 and SHA-2 specifications
- NIST: Retires SHA-1 cryptographic algorithm (opens in a new tab) – the 2030 phase-out date
- SHAttered: the first SHA-1 collision (opens in a new tab) – the 2017 collision from CWI Amsterdam and Google
- OWASP Password Storage Cheat Sheet (opens in a new tab) – Argon2id, scrypt and bcrypt guidance
- MDN: SubtleCrypto.digest() (opens in a new tab) – the browser API used for SHA hashes