Ad
DevToolXDevToolX

Diff Checker

Compare two texts and highlight additions and deletions

About Diff Checker

This tool compares two text inputs line by line and highlights additions, deletions, and unchanged lines using the Myers diff algorithm — the same algorithm used by Git. Paste two versions of a config file, a log snippet, or any text block and immediately see what changed. No installation, no clipboard data leaving your browser.

Common Use Cases

Compare log files before and after a deploy
Paste the relevant log window from before and after a release to quickly isolate new error lines or changed stack traces without manually scanning thousands of lines.
Review API response changes
Capture the JSON or XML response from a staging and production endpoint and diff them to confirm a breaking change or verify a fix took effect.
Diff two config files without committing
Compare a local .env, nginx.conf, or docker-compose.yml against a reference version without adding a git commit or running a separate diff command.
Compare two versions of a document
Paste two drafts of a spec, email, or doc to see exactly which sentences were added, removed, or reworded.

Frequently Asked Questions

What is the Myers diff algorithm?

Myers diff (1986) is an O(ND) algorithm where N is the total length of both inputs and D is the edit distance (minimum number of insertions and deletions). It is the standard algorithm in Git, GNU diff, and most diff tools because it produces the shortest edit script and finds a "most similar" alignment that matches human intuition.

What is the difference between line-level, word-level, and character-level diff?

Line-level diff (the default) treats each line as an atomic unit — useful for code and config files. Word-level diff splits lines into words before comparing, making it easier to spot a single changed value inside a long line. Character-level is the finest grain and is most useful for prose where short words are changed or transposed.

Why does moving a block of code show as delete and re-add rather than a move?

Standard diff algorithms only track insertions and deletions, not block moves. A moved block looks identical to deleting it in one place and inserting it in another. Detecting moves requires an extra rename-detection pass, which Git does optionally with --find-renames.

How does git diff --word-diff differ from this tool?

git diff --word-diff splits changed lines at word boundaries and shows inline additions/deletions within a line using [- -] and {+ +} markers. It is equivalent to what this tool calls word-level diff, but applied only to lines that Git has already identified as changed.

When should I use a 3-way merge or patch tool instead?

When you have a common ancestor and two diverged branches and need to merge them (3-way merge), or when you have a .patch file produced by git format-patch or diff -u and need to apply it (patch). A simple 2-way diff like this tool is best for ad-hoc comparison, not for applying changes.

Related Tools