HASH CALCULATOR
Compute digests, MD5 & SHA in one go.
Type text and instantly get MD5, SHA-1, SHA-256 and SHA-512 digests, with UTF-8 support and one-click copy.
Digests
Most tools process data locally; see this page for details
What does this tool do?
It generates common hash digests for any text, useful for integrity checks, signature debugging or learning. SHA uses the native Web Crypto API and MD5 is a pure-JS implementation — all local.
FAQ
Is my content uploaded?
No. All computation happens in your browser and nothing is sent to a server.
Is MD5 still safe?
MD5 is no longer suitable for security (collision attacks exist) but is still fine for integrity checks. For passwords or signatures, use SHA-256 or better.
使用步骤How to use
- 输入文本或拖入文件Type text or drop a file
- 选择算法:MD5 / SHA-1 / SHA-256 / SHA-512Choose the algorithm: MD5, SHA-1, SHA-256 or SHA-512
- 复制比对用的哈希值Copy the hash for comparison
示例与注意事项Example & notes
一个例子A worked example
给一段密码或脚本算摘要:粘贴文本后选择 MD5 / SHA-1 / SHA-256 / SHA-512,一键复制结果;中文按 UTF-8 编码计算,所以同一段中文在不同工具里结果一致。Hashing a password or a snippet: paste the text, pick MD5 / SHA-1 / SHA-256 / SHA-512 and copy the digest. Chinese text is hashed as UTF-8, so the same string gives the same digest across tools.
注意事项Things to watch
- MD5 与 SHA-1 已被证明存在碰撞,只适合校验文件是否被改动,不能用于密码存储。MD5 and SHA-1 have known collision attacks: fine for checking whether a file changed, never for storing passwords.
- 同样的文本每次结果相同(这是哈希的基本特性),若需要每次不同请加随机盐(salt)。The same text always gives the same digest (that is what a hash does); add a random salt if you need per-record values.
- 哈希是单向的,无法从摘要还原原文——忘记密码时只能重置,不能找回。Hashing is one-way: a digest cannot be reversed, so a forgotten password can only be reset, never recovered.
相关问答More Q&A
MD5 和 SHA-256 用哪个?Should I use MD5 or SHA-256?
只是判断文件有没有被改动,MD5 够快且够用;要涉及签名、证书或任何安全场景,选 SHA-256 以上。For simply checking whether a file changed, MD5 is fast and adequate; for signatures, certificates or anything security-related, use SHA-256 or stronger.
哈希值能破解吗?Can hashed values be cracked?
摘要本身无法反推,但弱密码的哈希可以被穷举比对(彩虹表、字典攻击)快速还原,所以存密码要用 bcrypt、PBKDF2 这类带盐的慢哈希,而不是直接存 MD5。The digest cannot be reversed, but hashes of weak passwords can be cracked by brute force (rainbow tables, dictionaries). Store passwords with slow salted hashes like bcrypt or PBKDF2, never raw MD5.