~/devtools / diff
tool::diff

Diff
Checker

Compare two texts and highlight additions, deletions, and changes in color. Supports line-by-line and word-level comparison.

ad · 728×90
// Color Guide
Green: added — Red: removed — Gray: unchanged
Mode:
Original
Modified
ad · 300×250
// about this tool

What is a Diff Checker?

A diff algorithm identifies the differences between two texts or files — finding which lines were added, deleted, or changed. It is the core technology behind Git, SVN, and other version control systems.

This tool provides two comparison modes. Line mode compares texts line by line, showing which entire lines were added or removed. Word mode goes further, highlighting the exact words that changed within each line.

Differences are computed using the LCS (Longest Common Subsequence) algorithm entirely in your browser. Results are color-coded: green for additions, red for deletions, and gray for unchanged content. Summary statistics show the count of added, removed, and changed lines.

Use Cases
  • Quickly review changes before a code review
  • Compare two versions of a configuration file (config, yaml, json)
  • Check differences between a translation draft and the final version
  • Compare previous and current API response payloads
  • Review edits between a document draft and the final copy
FAQ
Q. What is the difference between line mode and word mode?
Line mode treats each line as a unit and shows which lines were added or removed. Word mode goes inside each line and highlights exactly which words changed, giving a more granular view of modifications.
Q. Is my data sent to a server?
No. All comparison is done entirely in your browser using JavaScript. You can safely diff source code, configuration files, and personal data without any privacy concerns.
Q. Can it handle large texts?
Texts up to several thousand lines are handled without issue. For very large files (tens of thousands of lines), the LCS algorithm may take longer. For such cases, a dedicated tool like git diff is recommended.
// related tools
{}
JSON Formatter
Format, validate, and minify JSON. Supports nested structures and diff comparison.
db
SQL Formatter
Format SQL with indentation, uppercase keywords, and line breaks, or minify it.
md
Markdown Editor
Live Markdown preview — edit on the left, see rendered output on the right.
b64
Base64 Encoder
Encode and decode Base64 strings. Supports text, URLs, and binary data.