Diff Checker
Compare two texts and see the differences highlighted. Find additions, deletions, and changes.
How to use
- 1 Paste the original text in the left panel and the modified text in the right panel.
- 2 Differences are highlighted line by line: green (+) for added lines, red (−) for removed lines.
- 3 Unchanged lines are shown in white for context.
- 4 Use it to review code changes, spot differences in config files, or compare document versions.
Key features
- Side-by-side input: paste original on the left, modified on the right
- Color-coded line diff: green (+) for added lines, red (−) for removed lines
- Works with code, config files, and plain text
- No size limit — handles large documents
What is a Diff?
A diff compares two pieces of text and shows what changed between them — which lines were added, removed, or modified. The most common algorithm used is Myers' diff algorithm (1986), the same one that powers git diff, GNU diff, and most code review tools. It finds the shortest edit script (minimal set of insertions and deletions) that transforms one text into the other.
Output is typically shown in unified diff format — lines prefixed with + for additions and - for deletions — or in side-by-side format where the two versions are shown in parallel columns.
Common Use Cases
Code review outside of Git
Compare snippets, scripts, or generated code that isn't under version control — paste both versions and see exactly what changed.
Config file comparison
Spot differences between a local config and a staging/production config to find environment-specific overrides or missing keys.
Content and copy migration
Compare old and new versions of marketing copy, legal text, or documentation to verify only the intended changes were made.
Debugging regressions
Paste two versions of a failing test's output or a response payload to isolate what data changed between a working and broken state.
Dependency and lock file audits
Compare package-lock.json or yarn.lock snapshots to understand what changed after running npm install.
Database migration review
Diff generated SQL migration scripts to verify that schema changes are exactly what you expected before running them.
Diff Granularity Levels
Diffs can operate at different levels of granularity depending on how precise you need the comparison to be.
| Level | Unit of comparison | Best for |
|---|---|---|
| Line diff | Entire lines | Source code, config files — the standard git diff view |
| Word diff | Words / tokens | Prose, documentation, Markdown — highlights just the changed words |
| Character diff | Individual characters | Spotting typos, minor formatting changes, or single-character edits |