文本对比工具(Diff)
逐行对比两段文本。用彩色标注出新增、删除以及未改动的行。
如何使用本工具
- 1
Paste or type the original version into the left textarea labeled Original.
- 2
Paste or type the changed version into the right textarea labeled Modified.
- 3
Read the result panel below: lines prefixed with a minus and shown in red were removed, lines prefixed with a plus and shown in green were added, and lines prefixed with an equals sign are unchanged.
- 4
Edit either box to refine your input; the diff recomputes instantly as you type.
什么是文本对比工具(Diff)?
差异对比(diff)工具会比较一段文本的两个版本,并高亮显示发生了哪些变化。适用于对比配置文件、合同、代码修订,或任意文档的两个版本。本工具完全在你的浏览器中运行:不会上传任何数据。
常见使用场景
Spot which keys changed between two versions of a .env or config file pasted side by side.
Compare two revisions of a short paragraph or email draft before sending the edited version.
Check what a teammate altered in a snippet they pasted into chat versus your local copy.
Verify that a find-and-replace did exactly what you intended across a block of text.
Review line-level differences between two SQL queries or log excerpts of similar length.
Confirm two lists (allowlists, redirect rules, CSV rows) are identical or see exactly where they diverge.
常见问题
支持单词级别的对比吗?▼
相关工具
JWT解码器
即时解码JSON Web Token(JWT)。完全在你的浏览器中运行:令牌绝不会离开你的设备,可安全用于生产环境的密钥。
JSON格式化与校验工具
在线格式化、校验和压缩JSON。完全在你的浏览器中运行:你的数据永远不会离开你的设备。
XML格式化工具
格式化并美化XML文档。适用于SOAP、站点地图、RSS订阅源和配置文件。
Base64编码与解码工具
将字符串编码为Base64,或将Base64解码为文本。尊重你的隐私:全部在你的浏览器中运行。
URL编码与解码工具
将文本转换为URL安全的编码(百分号编码),或进行反向转换。适用于查询字符串、重定向和OAuth流程。
HTML实体编码与解码工具
将特殊字符转换为HTML实体(&、<等),或进行反向转换。适用于将文本安全地嵌入HTML。