Hash Generator
Generate MD5, SHA-1, SHA-256 and SHA-512 hashes using the Web Crypto API. Your input never leaves your browser.
Privacy: This tool runs entirely in your browser. Your data never leaves your device and is never uploaded to any server.
Hashes are computed live in your browser using the Web Crypto API (and a local MD5 implementation).
How to use this hash generator
- Type or paste the input text, or load a file.
- MD5, SHA-1, SHA-256 and SHA-512 are calculated at the same time.
- Copy any digest, or compare two inputs to check whether they match.
- Hashing runs in your browser — the input is never uploaded.
Choosing a hash algorithm
All four algorithms here are deterministic and one-way, but they are not interchangeable. Match the algorithm to the job.
| Algorithm | Digest length | Status | Use it for |
|---|---|---|---|
| MD5 | 128-bit (32 hex chars) | Broken for security | Checksums, cache keys, ETags |
| SHA-1 | 160-bit (40 hex chars) | Deprecated for signatures | Legacy systems only |
| SHA-256 | 256-bit (64 hex chars) | Recommended | Signatures, integrity, certificates |
| SHA-512 | 512-bit (128 hex chars) | Recommended | Same family, longer output |
| bcrypt, scrypt, Argon2 | Varies | Recommended for passwords | Storing passwords |
What a hash function does
A hash function maps input of any length to a fixed-length fingerprint. The same input always produces the same output, changing one character produces a completely different output, and it is computationally infeasible to work backwards from the digest to the input.
Digests have fixed sizes because of that: MD5 and SHA-1 produce 128 and 160 bits, while SHA-256 and SHA-512 produce 256 and 512 bits.
Which algorithm should you use
- SHA-256 — the sensible default for security and integrity checks.
- SHA-512 — same family, longer digest, common on 64-bit systems.
- MD5 — still fine for cache keys and non-adversarial checksums, but broken for anything security-related.
- SHA-1 — deprecated for signatures, avoid it in new work.
- For passwords use bcrypt, scrypt or Argon2 — never a plain hash.
Hashing is not encryption
Encryption is reversible with a key. Hashing is one-way by design: there is no key to recover and no way to decrypt a digest. That is exactly what makes hashes useful for verifying a download, deduplicating files or detecting that a config changed — and exactly why they cannot be used for data you later need to read back.
Verifying a download
Most download pages publish a SHA-256 checksum next to the file. Hash the file you received and compare the two strings character by character; if they differ by a single digit, the download is corrupted or has been tampered with. This is by far the most common practical use of a hash tool.
Frequently asked questions
What is a hash function?
A hash function maps arbitrary input to a fixed-size string of characters. The same input always produces the same hash.
Is MD5 secure?
MD5 is considered cryptographically broken and should not be used for security. Use SHA-256 or SHA-512 for cryptographic purposes.
Is my input sent to a server?
No. Hashing runs locally in your browser using the Web Crypto API and a local MD5 implementation.
Can two different inputs produce the same hash?
In theory yes, and that is called a collision. For SHA-256 no practical collision has ever been found; for MD5 colliding inputs can be constructed deliberately, which is why it is unfit for security.
Why do small input changes produce completely different hashes?
That is the avalanche effect: flipping a single input bit should change roughly half of the output bits. It is a sign of a healthy hash function.
Should I hash passwords with SHA-256?
No. General-purpose hashes are designed to be fast, which is exactly what an attacker wants. Use a deliberately slow, memory-hard function such as bcrypt, scrypt or Argon2.
More Encoding & Hashing tools
Base64 Encoder / Decoder
Encode or decode text to and from Base64, including URL-safe mode and file-to-Base64 conversion with Unicode support.
URL Encoder / Decoder
Encode and decode URLs or URI components following RFC 3986, perfect for query strings, paths and shareable links.
JWT Decoder
Decode and inspect the header, payload and signature of a JSON Web Token, entirely in your browser.
HTML Entity Encoder / Decoder
Encode and decode HTML entities, with optional encoding of all non-ASCII characters.