Text & Utilities

Text Diff Checker

Compare two texts side-by-side or unified to inspect additions, deletions, and modifications.

Original Text
Modified Text
Differences+1 added-1 removed~3 changed=6 unchanged
1server:1server:
2 port: 80802 port: 8443
3 host: 0.0.0.03 host: 0.0.0.0
4 timeout: 30s4 timeout: 30s
5 tls: true
5logging:6logging:
6 level: info7 level: debug
7 format: text8 format: json
8features:9features:
9 - search10 - search
10 - export

About this tool

A diff shows exactly what changed between two versions of a text. Developers use it to review configuration changes before a deploy, writers compare drafts, support teams compare two log excerpts, and translators check what changed in a source document. Reading two versions side by side by eye is slow and error-prone; a diff points at every added, removed and modified line in seconds.

This checker compares line by line first, then highlights the exact words or characters that changed inside each modified line, like a code review tool. Both texts stay in your browser: nothing is sent to a server, so it is safe for contracts, credentials files and private logs.

How to use Text Diff Checker

  1. Paste the original text on the left and the new version on the right, or use Open File on either side to load a local file.
  2. Pick Side by side to see both versions aligned, or Unified to read changes top to bottom like a git diff.
  3. Use Ignore whitespace when only indentation or spacing changed (for example after reformatting code), and Ignore case for case-insensitive comparisons.
  4. Switch the highlight between Words and Characters. Words is easier to read for prose; Characters catches single-character changes such as a changed digit or punctuation.
  5. Keep Collapse unchanged on to hide long identical sections, and click a gap to expand it. Download .diff exports a standard unified patch that git apply and patch understand.

Examples

Spot a changed value in a config file

Input
Original:
  port: 8080
  level: info

Modified:
  port: 8443
  level: info
Result
- port: 8080
+ port: 8443
  level: info

Only the digits that changed are highlighted inside the line.

Ignore re-indentation

Input
Original:
if (ok) {
    run();
}

Modified:
if (ok) {
  run();
}
Result
With "Ignore whitespace": the two texts are identical.

How the comparison works

The tool uses the Myers difference algorithm, the same family of algorithms used by git and most version-control systems. It finds the smallest set of line insertions and deletions that turns the original into the modified text. When a removed line is directly replaced by an added line, the two are paired as a modification and compared again at word or character level, which is why you see precise highlights instead of a whole red line followed by a whole green line.

Tips for cleaner diffs

  • Normalize formatting first: run JSON through a formatter (with sorted keys) or SQL through a SQL formatter before comparing, so that only meaningful changes remain.
  • Line endings are normalized automatically, so files saved on Windows (CRLF) and macOS/Linux (LF) compare cleanly.
  • For very long single-line texts, break them into lines first; line-based diffs are most useful when each logical item is on its own line.
  • Use Swap to reverse the direction of the comparison instead of re-pasting both texts.

Frequently asked questions

Everything you need to know about this tool and data security.

What is the difference between side-by-side and unified view?

Side by side shows the original and the modified text in two aligned columns, which is easiest for reviewing edits. Unified shows a single column where removed lines are marked with - and added lines with +, the format used by git diff and code review emails.

Can I compare files instead of pasted text?

Yes. Use Open File above each panel to load any text file, such as .txt, .json, .yaml, .csv, .log or source code. The file is read locally by your browser.

What is a .diff or .patch file?

It is a plain-text description of the changes in the unified diff format. You can attach it to a ticket, send it in a review, or apply it to the original file with git apply or the patch command.

Does it work with Chinese, Japanese or other languages?

Yes. Comparison works on any Unicode text. For languages written without spaces, the Characters highlight mode gives the most precise result.

Is my data safe when using this tool?

Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.