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.
| 原始 | 修改后 |
|---|---|
| function hello() { | function hello() { |
| - console.log("hello") | + console.log("hello world") |
| return true | return true |
| } | } |
| -const x = 1 | +const x = 2 |
使用说明
- 在左侧粘贴原始代码,右侧粘贴修改后代码
- 自动并排对比,高亮新增、删除、修改的行
- 可选择忽略空白或大小写
- 差异结果可一键复制
常见问题
- 数据处理安全吗? 对比全部在浏览器本地完成,不上传代码
- 支持哪些语言? 与语言无关,任意文本/代码均可对比
- 大文件卡顿? 建议控制在数万行以内
More Developer
View allJSON Formatter
Format, minify, validate JSON, convert to Go struct / TS interface
JSON Field Search
Search JSON by field, value or path with highlights, supports jq expressions
Timestamp Converter
Convert between Unix timestamps and dates, seconds and milliseconds
Cron Expression
Generate and parse cron expressions, preview next run time
UUID Generator
Generate UUID v4 / v7 / ULID / NanoID
Hash Calculator
Compute MD5 / SHA1 / SHA256 / SHA512 of text or files
JWT Decoder
Decode JWT header and payload, view expiry time
URL Encoder / Decoder
Encode and decode URL / URI components
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.