Code Diff

Compare two texts side by side, highlight changed lines

Code Diff is a free online Developer tool. Compare two texts side by side, highlight changed lines Related terms: diff · compare · 对比 · 代码差异. Use it on this page without signing in.

+0 新增-0 删除~2 修改
原始修改后
function hello() { function hello() {
- console.log("hello")+ console.log("hello world")
return true return true
} }
   
-const x = 1+const x = 2
Help

使用说明

  1. 在左侧粘贴原始代码,右侧粘贴修改后代码
  2. 自动并排对比,高亮新增、删除、修改的行
  3. 可选择忽略空白或大小写
  4. 差异结果可一键复制

常见问题

  • 数据处理安全吗? 对比全部在浏览器本地完成,不上传代码
  • 支持哪些语言? 与语言无关,任意文本/代码均可对比
  • 大文件卡顿? 建议控制在数万行以内

More Developer

View all

FAQ about Code Diff

What can Code Diff do?

Code Diff is a Developer tool. Compare two texts side by side, highlight changed lines You can finish the job on this page.

Who should use Code Diff?

Anyone handling diff · compare · 对比 · 代码差异 who does not want to install desktop software can use Code Diff in the browser.

Is Code Diff safe? Is my data uploaded?

This tool runs in your browser. We do not collect the content you enter into Code Diff just because you used it.

What similar tools exist?

Related tools in the same Developer group are listed at the bottom of this page.