Hash generator
Compute MD5, SHA-1, SHA-256 and SHA-512 hashes from text or a file, entirely in your browser.
Hash results
4 hashes computed
- MD5
-- SHA-1
-- SHA-256
-- SHA-512
-
How it works
A hash function produces a fixed-size digest from any input. The same input always produces the same hash, and changing even one character produces a completely different one, which is why hashes are used to verify that a file or message has not changed.
- Choose text or a file
Switch tabs, then type or paste text, or drop a file onto the drop area.
- Read the four hashes
MD5, SHA-1, SHA-256 and SHA-512 all compute at once, updating as you type.
- Copy the one you need
Each row has its own copy button, so you never copy the wrong hash.
Which hash should you use
Hash functions are one-way: you cannot reverse a hash to recover the original text. That makes them useful for integrity checks, but MD5 and SHA-1 are cryptographically broken for security-sensitive uses. Collision attacks are practical against both, meaning two different inputs can produce the same hash.
- MD5 and SHA-1: still fine for non-security uses like file checksums, cache keys or de-duplication, where collisions are not a real threat.
- SHA-256 and SHA-512: the standard choice for security-relevant integrity checks, digital signatures and checksums published alongside a download.
- Passwords: none of the four algorithms here are appropriate for password storage, not even SHA-512. Use a purpose-built, slow algorithm such as bcrypt, scrypt or Argon2 instead.
Nothing leaves your device
Hashing runs locally using the Web Crypto API for SHA-1, SHA-256 and SHA-512, and a JavaScript implementation for MD5. Neither your text nor a file you drop is ever transmitted anywhere, so it is safe to check confidential strings, API keys or downloaded files.
Frequently asked questions
How do I generate a SHA-256 hash from text online?
Stay on the Text tab and type or paste your text. The tool computes MD5, SHA-1, SHA-256 and SHA-512 at the same time and updates every row as you type. Use each row's copy button to copy that specific hash to your clipboard.
Can I hash a file instead of typing text?
Yes. Switch to the File tab and drop a file onto the drop area, or choose one with the file picker. The tool reads the file's bytes locally and computes all four hashes from them, the same way it would hash pasted text. This is useful for checking a downloaded file's checksum against one published by its source.
Which hash algorithm should I use for password storage?
None of the four algorithms shown here, MD5, SHA-1, SHA-256 or SHA-512, should be used directly to hash passwords. Plain SHA-2 is too fast, which makes brute-force attacks feasible. For passwords, use a purpose-built, slow algorithm like bcrypt, scrypt or Argon2. Use SHA-256 or SHA-512 for data integrity checks, checksums and digital signatures, not for password hashing.
Are MD5 and SHA-1 still safe to use?
MD5 and SHA-1 are cryptographically broken for security-sensitive uses. Collision attacks are practical against both, meaning two different inputs can produce the same hash. They are still acceptable for non-security purposes like file checksums, cache keys, or checksumming non-critical data where collisions are not a threat. For anything security-related, use SHA-256 or higher.
Does my text or file get sent to a server when generating hashes?
No. All hashing runs in your browser using the Web Crypto API and JavaScript. Your input, including a file you drop, never leaves your device. This means you can safely hash confidential strings, API keys or downloaded files to compare digests without any server-side exposure.
Can I reverse a hash back to the original text?
No. Hash functions are one-way by design, it is computationally infeasible to derive the original input from the output digest. What attackers do instead is precompute hashes for common inputs, known as rainbow tables, and look up a match. This is why salting passwords before hashing is critical, and why weak inputs like "password123" can be reversed via lookup even though the algorithm itself is not reversible.