How to generate a hash
- Type or paste your text. All five hashes update as you type.
- Press Copy next to the hash you need, or Copy result to take all of them.
- Tick Upper case hex if the system you compare against writes hashes in capitals. The digits are identical either way.
The text is converted to UTF-8 bytes before hashing, the same as md5sum, sha256sum or the hash functions of any programming language do for a string. A line break counts as a character: hello and hello followed by a newline have different hashes.
Examples
The word hello in lower case:
| Algorithm | Hash |
|---|---|
| MD5 | 5d41402abc4b2a76b9719d911017c592 |
| SHA-1 | aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d |
| SHA-256 | 2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 |
Change one letter and nothing about the hash resembles the old one, which is what you want from a hash function. SHA-256 of Hello: 185f8db32271fe25f561a6fc938b2e264306ec304eda518007d1764826381969. A single added space does the same: 5e3235a8346e5a4585f8c58562f5052b8fe26a3bb122e1e96c76784964dfc461 is the SHA-256 of hello .
The empty text has a well-known hash too, which you can use to check an implementation: SHA-256 of nothing is e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855. In upper case, SHA-1 of abc is A9993E364706816ABA3E25717850C26C9CD0D89D, the standard test vector from FIPS 180.
MD5, SHA-1, SHA-256: which one to use
| Algorithm | Length | Status | Fine for |
|---|---|---|---|
| MD5 | 128 bit (32 hex) | Broken for security: collisions can be made in seconds | Checking a download for accidental corruption, cache keys, deduplication |
| SHA-1 | 160 bit (40 hex) | Broken for signatures: a practical collision was shown in 2017 | Git object names, legacy systems |
| SHA-256 | 256 bit (64 hex) | Secure | File integrity, signatures, certificates, blockchains |
| SHA-384 / SHA-512 | 384 / 512 bit | Secure | Where a longer digest is required; fast on 64-bit CPUs |
The SHA-2 family is specified in FIPS 180-4; MD5 is in RFC 1321. Pick SHA-256 unless a system asks for another.
What a hash can and cannot do
- It identifies data. Equal text always gives an equal hash, so you can compare a file or message with a published checksum.
- It is one-way. You cannot compute the text from the hash. But short or common inputs can be guessed: attackers keep tables of the MD5 and SHA-1 of millions of passwords.
- It is not encryption and not a password store. Never store passwords as a plain MD5 or SHA-256. Use a slow, salted password hash such as Argon2, scrypt or bcrypt.
- It does not prove who sent something. For that you need a signature or an HMAC with a secret key; a bare hash can be recomputed by anyone.
This page hashes text only: to hash a file, use sha256sum file (Linux, macOS) or Get-FileHash file (PowerShell). For a reversible encoding use Base64.
Is it accurate and private?
The hash functions are implemented in the page itself (no network, no library from a third party) and were checked against the reference implementation built into Node.js on edge cases: empty text, texts of 55, 56, 63, 64, 111, 112 and 128 bytes, which sit on the padding boundaries of the algorithms, accented text, emoji, and a megabyte of text. Text you type is never sent anywhere.
For very long text (over 150,000 characters) SHA-384 and SHA-512 are skipped to keep the page responsive; MD5, SHA-1 and SHA-256 still cover the whole text.
Related tools
- Base64 encode and decode – reversible encoding, unlike a hash
- UUID generator – unique identifiers
- Password generator – strong random passwords to hash or store in a manager
- JWT decoder
Hash generator FAQ
How do I generate an MD5 hash?
Type or paste your text. The MD5 hash is the first line of the result and updates as you type; press Copy to take it.
How do I generate a SHA-256 hash?
Type or paste the text. The SHA-256 hash (64 hex characters) appears under the MD5 and SHA-1 lines. It is computed in your browser.
Can I decrypt or reverse a hash?
No. A hash is one-way. Short or common texts can be guessed by trying candidates, but the original cannot be computed from the hash.
Is MD5 safe to use?
Not for security. Collisions can be created easily, so do not use it for signatures or passwords. It is fine for spotting accidental file corruption.
Why is my hash different from another tool?
Usually a hidden difference in the text: a trailing newline or space, a different line ending, or a different character encoding. This tool hashes the exact characters as UTF-8.
Does this hash files?
No, text only. To hash a file use sha256sum, md5sum or Get-FileHash on your computer.
Is my text uploaded?
No. The hashes are computed in your browser and nothing is sent or stored.