Hash Generator (SHA, MD5)
The Hash Generator is a free online tool that computes hash digests of text using MD5, SHA-1, SHA-256, SHA-384, and SHA-512 algorithms. All hashing is performed locally in your browser using the Web Crypto API — no data is ever sent to a server.
Features real-time hashing as you type, uppercase/lowercase toggle, copy-to-clipboard, and a compare mode to verify hashes against expected values. Security warnings are shown for MD5 and SHA-1 which are no longer recommended for cryptographic use.
How it works
A cryptographic hash function maps input data of arbitrary size to a fixed-size output (digest). SHA-256 produces a 256-bit (64 hex character) digest. MD5 produces a 128-bit (32 hex character) digest. The same input always produces the same hash, but even a tiny change in input produces a completely different output.
Use cases
- Verifying file integrity by comparing checksums
- Checking data hasn't been tampered with during transfer
- Generating unique identifiers from content
- Comparing passwords or tokens without exposing the original value
- Validating download integrity using SHA-256 checksums
Frequently asked questions
What is the difference between MD5 and SHA-256?
MD5 produces a 128-bit (32 hex character) digest and is fast but cryptographically broken due to practical collision attacks. SHA-256 produces a 256-bit (64 hex character) digest and is part of the SHA-2 family widely considered secure today. Use SHA-256 for security-sensitive purposes and reserve MD5 only for non-security checksums.
Is MD5 still safe to use?
MD5 is no longer safe for security purposes because researchers can generate collisions, two different inputs with the same hash, in seconds. It should not be used for passwords, digital signatures, or integrity against a malicious attacker. It remains acceptable only for detecting accidental corruption, such as a basic file checksum.
Can a hash be reversed back to the original text?
No, cryptographic hash functions are one-way, so you cannot mathematically reverse a digest to recover the input. Attackers instead guess inputs and compare hashes using dictionaries or brute force. This is why the same input always yields the same hash, while even a one-character change produces a completely different output.
Is my data sent to a server when I generate a hash here?
No, all hashing runs locally in your browser using the built-in Web Crypto API, so your text never leaves your device. Nothing is uploaded or stored on a server, which makes the tool suitable for sensitive input. You can confirm this by disconnecting from the internet and seeing that hashing still works.
How long is a SHA-256 hash?
A SHA-256 hash is always 256 bits, displayed as 64 hexadecimal characters, regardless of the input length. SHA-512 produces 128 hex characters, SHA-1 produces 40, and MD5 produces 32. The output length is fixed by the algorithm, so hashing one word or an entire book gives the same-length digest.