What does the text diff tool do?
Compares two plain-text inputs line by line using the Myers diff algorithm. Highlights additions in green and deletions in red — runs entirely in your browser.
Paste two text versions to see additions, deletions, and edits side by side.
Loading tool…
A text diff compares two versions of text and highlights what was added, deleted, or changed. It shows the minimum set of edits needed to transform version A into version B.
Diff (short for 'difference') is a method of comparing two text versions to identify what changed. The classic diff algorithm (Myers, 1986) finds the shortest edit script — the minimum number of insertions and deletions to convert one text into another.
**What a diff shows:**
• **Added lines** (in green/+ sign): present in the new version but not the original
• **Deleted lines** (in red/− sign): present in the original but removed
• **Unchanged lines** (context): lines that appear in both versions
**Types of diff:**
• **Line diff**: compares whole lines — fast, useful for code and prose
• **Word diff**: highlights changed words within lines — better for prose editing
• **Character diff**: shows individual character changes — useful for catching subtle typos
**Common uses:** code review, contract revision, proofreading, comparing config files, checking API responses, diffing log output.
This tool performs line-by-line diff in your browser — no files are uploaded.
Concise answers for common searches — definitions, steps, and comparisons.
Compares two plain-text inputs line by line using the Myers diff algorithm. Highlights additions in green and deletions in red — runs entirely in your browser.
Yes — all diffing runs in your browser. Your text is never uploaded to a server.
In the left panel (Version A), paste the original or older version of your text. This is the baseline you are comparing from.
In the right panel (Version B), paste the revised or newer version. The diff engine compares B against A.
The diff output highlights additions in green and deletions in red. Unchanged lines are shown as context. You can switch between inline and side-by-side views.
Use the copy button to copy the diff summary or the individual changed lines. Share the URL if you want to link to the comparison.
Common real-world scenarios where this tool saves time.
Compare two versions of a function, config file, or SQL query before and after changes — useful when you are working outside a Git repository.
Paste two versions of a contract, policy, or document to see exactly what clauses changed between drafts — faster than reading both versions sequentially.
Compare edited copy against the original to confirm changes are correct and nothing was accidentally deleted or reordered.
Paste two JSON or XML API responses to spot exactly which fields changed between a test run and a production call.
Compare nginx.conf, package.json, or environment files before and after changes to confirm only the intended lines were modified.
Different diff modes and when to use them.
| Mode | What it compares | Best for |
|---|---|---|
| Line diff | Whole lines | Code, configs, SQL |
| Word diff | Words within lines | Prose, essays, contracts |
| Character diff | Individual characters | Catching subtle typos |
| Side-by-side | Two columns | Visual document comparison |
| Inline | Single column with markers | Compact review / patch format |
Advertisement
The tool uses the Myers diff algorithm — the same algorithm used by Git, GNU diff, GitHub, and most code editors. It finds the shortest edit script: the minimum number of line insertions and deletions to transform Version A into Version B.
Line diff compares whole lines — if one word changes in a line, the entire line is marked as deleted/added. Word diff highlights only the specific words that changed within a line. Word diff is better for prose editing; line diff is better for code and configs where line integrity matters.
Yes — you can paste any plain text including JSON, HTML, CSS, or code. The diff is purely text-based; it does not parse or understand structure. For JSON specifically, consider formatting both versions identically (minified or pretty-printed) before diffing to avoid formatting noise masking real changes.
No. The diff runs entirely in your browser using JavaScript. Your text is never sent to EverydayTools servers. This makes it safe for comparing confidential contracts, private code, or sensitive configuration files.
Context lines show unchanged lines surrounding each change to give you positional reference — like in a Git diff. Setting context to 0 shows only changed lines; 3 (default) shows 3 unchanged lines before and after each change block, matching Git's default behavior.
This tool produces the same visual output as 'git diff' for plain-text content, but without the file tracking, history, or branch management that Git provides. Use this for quick one-off comparisons; use Git for version-controlled projects.
Unified diff (used by Git and patch utilities) shows changes with a header (@@) indicating line numbers, minus signs for deletions, plus signs for additions, and spaces for context. It is the standard format for distributing patches. This tool produces unified-style output that can be copy-pasted into patch workflows.
Copy and paste the content of both files into the two panels. For very large files (100,000+ lines), browser-based diff may be slow — use the command-line 'diff' or 'git diff' for large file comparisons.
Text you compare stays in your browser during diffing—it is not uploaded to EverydayTools servers.
For semantically meaningful code diffs, prefer a version control system (Git). This tool performs plain-text comparison only.
Part of Text Tools
More free tools for the same workflow.
Advertisement
Reviewed on 2026-06-08.
Line/word/char
Compare by lines, words, or characters with inline or side-by-side views.
Live diff
Highlights additions and deletions as you type—runs entirely in-browser.
Export ready
Copy formatted, plain, or unified diff text for tickets and reviews.