🔐 编码与哈希Encode & Hash

计算文本的 MD5、SHA-1、SHA-256、SHA-512 摘要,或进行 Base64、URL、HTML 编解码,ROT13 与 Unicode 码点转换。SHA 系列使用浏览器内置加密接口。Compute MD5, SHA-1/256/512 digests, or Base64 / URL / HTML encode-decode, ROT13 and Unicode points. SHA uses the browser’s built-in crypto.

① 输入文本① Input

② 操作② Operation

③ 结果③ Result

使用说明How to use

怎么用How to use
  1. 输入要编码/哈希的文本Enter text to encode/hash
  2. 选择算法:MD5/SHA 家族/Base64/URL 编解码等Pick an algorithm: MD5/SHA family/Base64/URL
  3. 查看结果,可复制或下载Review, copy or download

示例:abc → MD5 900150…f72Example: abc → MD5 900150…f72

全程在你的浏览器本地完成,文本不会上传服务器。Runs entirely in your browser; your text is never uploaded.

选择算法后结果实时更新。MD5 由本地内置的轻量脚本计算,全程离线;SHA 系列(含 SHA-384)使用浏览器加密接口,需在 https 或 localhost 下使用;CRC32 纯本地计算;HMAC 为带密钥的 SHA-256 摘要(同样需安全环境)。Base64/URL/HTML/ROT13 全程离线。Results update live. MD5 uses a tiny built-in script, fully offline; SHA (incl. SHA-384) uses the browser crypto (needs https or localhost); CRC32 is pure local; HMAC is a keyed SHA-256 digest (also needs a secure context). Base64/URL/HTML/ROT13 work fully offline.

📚 什么是哈希(散列)?📚 What is a hash?

哈希把任意长度的输入映射为固定长度的「指纹」(如 SHA-256 恒为 64 位十六进制)。三个核心性质:① **单向**——由指纹无法反推原文;② **确定性**——同一输入永远得到同一指纹;③ **雪崩效应**——原文改一个字符,指纹面目全非。因此哈希常用于:校验文件完整性(下载后对比哈希)、存密码(只存哈希不存明文)、去重与索引。A hash maps arbitrary-length input to a fixed-length “fingerprint” (SHA-256 is always 64 hex chars). Three core properties: ① one-way — you can’t recover the input from the fingerprint; ② deterministic — same input always gives the same fingerprint; ③ avalanche — changing one char changes the fingerprint completely. Hence hashes are used for file-integrity checks, password storage (store the hash, not the plaintext), dedup and indexing.

算法选用:**MD5(128 bit)与 SHA-1 已不推荐**用于安全场景(碰撞攻击可行),但用于校验/去重仍常见;**SHA-256/384/512** 是当前主流安全散列;**CRC32** 是快速校验和(检测随机损坏、非对抗场景);**HMAC** 是带密钥的认证码——需要「防篡改」时用 HMAC 而非裸哈希(例如 API 签名)。本工具的「全部算法」模式可一键对比六种结果。Choosing algorithms: MD5 (128-bit) and SHA-1 are no longer recommended for security (collision attacks feasible), but remain common for checksums/dedup; SHA-256/384/512 are the current mainstream secure hashes; CRC32 is a fast checksum (detects random corruption, not adversarial tampering); HMAC is a keyed authentication code — use it when tamper-resistance matters (e.g. API signatures), not a bare hash. The “All algorithms” mode compares all six at once.