文本指纹生成器 Text Fingerprint Generator
为任意文本生成可复现的“指纹”(Fingerprint),用于快速判断文本是否发生变化、是否与另一段文本完全一致。
Generate a reproducible fingerprint for any text, so you can quickly detect changes or verify exact equality.
1. 输入参数 · Input
3. 使用说明 · Notes
这是什么? 文本指纹(Fingerprint)就是对文本做一次稳定的“摘要计算”,得到一串短而固定长度的结果。
What is this? A text fingerprint is a stable digest (summary) of your text, producing a fixed-length result.
What is this? A text fingerprint is a stable digest (summary) of your text, producing a fixed-length result.
-
用途 1:快速检测是否变更 · Use case 1: change detection
你可以把某段文本的指纹保存起来(例如记录在日志、版本说明、数据库字段中),下次再生成一次指纹,比较两次指纹是否相等:相等通常意味着文本完全一致。
Save a fingerprint in logs/version notes/db fields, then regenerate later—if the fingerprints match, the text is usually identical. -
用途 2:对比两段文本是否一致 · Use case 2: equality check
打开“对比模式”,粘贴 A 与 B 两段文本,本工具会在相同规则下生成两份指纹,并给出结论。它比肉眼对比更快,尤其适合长文本、配置、接口返回等。
Enable Compare Mode and paste text A and B. The tool computes fingerprints using the same rules and tells you whether they match—great for long texts/configs/API responses. -
关于空格/换行 · About whitespace and line endings
“看起来一样”的文本,可能在内部不一样:比如多了一个空格、Tab,或者 Windows 的 CRLF 与 Linux 的 LF。
Two texts may look the same but differ internally (extra spaces/tabs, CRLF vs LF).
因此建议在跨平台复制粘贴时开启“统一换行符”,在粘贴时容易带空白时开启“Trim”。
For cross-platform copy/paste, enable Normalize line endings; enable Trim when pasted text may contain leading/trailing blanks. -
SHA-256 vs FNV-1a · Which algorithm?
SHA-256: 更通用、更稳妥、抗碰撞更强,适合当作“内容唯一摘要”。
SHA-256: Safer and more universal; better collision resistance—best default choice.
FNV-1a 64-bit: 速度快、实现简单,适合低风险的“快速变更检测”,但不建议用于安全场景或作为强唯一 ID。
FNV-1a 64-bit: Very fast for quick checks, but weaker collision resistance—avoid for security-critical uses. -
输出格式 · Output formats
Hex 最常见、可读性好;Base64 更短;Base64URL 适合放到 URL 或文件名里(更少特殊字符)。
Hex is common and readable; Base64 is shorter; Base64URL is safer for URLs/filenames (fewer special characters).
“Short” 只为界面展示方便,会截断中间内容,不适合长期存档。
“Short” is truncated for UI readability—do not use it for archival identification. -
隐私与安全 · Privacy & security
本工具在浏览器本地计算,不上传文本到服务器(除非你自行把它粘贴到其他地方)。
Everything is computed locally in your browser; no server upload (unless you paste it elsewhere).
但指纹也可能泄露信息(例如可被用来验证某段文本是否出现过),敏感文本请谨慎传播指纹。
Fingerprints can still leak information (e.g., verifying whether a text existed). Be cautious with sensitive content. -
兼容性提示 · Compatibility note
SHA 系列使用浏览器的 WebCrypto API。部分浏览器/环境(如非 HTTPS 或受限环境)可能不可用,此时你仍可选择 FNV-1a。
SHA uses the browser WebCrypto API. In some restricted contexts (e.g., non-HTTPS or limited environments), it may be unavailable—use FNV-1a as a fallback.
免责声明:本工具用于学习、调试与快速比对参考,不构成任何安全承诺或合规保证。请不要把非加密算法当作密码学用途。
Disclaimer: For learning/debugging/change-check purposes only. Do not treat non-cryptographic hashes as cryptographic guarantees.
