Diff Checker
Compare two texts and highlight differences in side-by-side, unified or inline view. Powered by the Myers diff algorithm — the same one used by Git and GitHub.
Original (A)
Modified (B)
A serious diff tool that runs entirely in your browser
This page implements the same Myers diff algorithm that Git, GitHub, GitLab, VS Code and most "diff" tools use. It finds the shortest edit script — the smallest sequence of insertions and deletions to turn one text into the other. The result is a clean, intuitive comparison without spurious "everything changed" noise.
Three view modes
- Side-by-side — two aligned columns, like a code review tool. Best for inspecting code diffs at a glance.
- Unified — git-diff format with
+/−prefixes. Best for sharing patches in chat or documentation. - Inline — changes shown within the flow, with deletions struck through and insertions underlined. Best for prose, blog posts, contracts.
Three comparison granularities
- Lines (default) — the standard for source code and most documents.
- Words — best for prose where line breaks are arbitrary. Highlights the actual changed words.
- Characters — every single character compared. Useful for short strings, IDs, and detecting subtle differences (a Greek letter swapped for a Latin one, a comma changed to a period).
Ignore options
- Whitespace — treat lines/words/characters as equal even if their spacing differs. Essential when comparing code where someone re-formatted.
- Case — case-insensitive comparison. Useful when one source is normalized.
- Empty lines — drop blank lines before comparing. Useful when only paragraph spacing changed.
Why Myers and not a simpler algorithm?
Naive longest-common-subsequence diff is O(N·M) in time and memory — fine for a few hundred lines but slow on real files. Myers' algorithm is O(N·D), where D is the size of the actual diff. For typical inputs (most lines unchanged), D is small and the algorithm runs in near-linear time. Our implementation handles 500-line diffs in milliseconds.
Privacy
Both texts are diffed entirely in your browser tab. We don't upload, we don't log, we don't analyze. No external library is loaded — the algorithm is ~120 lines of vanilla JavaScript embedded in the page.
Export
The Copy as unified patch button copies a diff -u-style patch
to your clipboard, ready to paste into a GitHub comment, a Slack message, or to save as a
.patch file.
Common use cases
- Compare two versions of a config file or YAML manifest.
- See exactly what changed between two AI-generated drafts.
- Verify a legal contract revision word-by-word.
- Spot a single-character typo in a long string (API key, hash, URL).
- Generate a shareable patch for a code change without committing to git first.
Frequently Asked Questions
- How does this diff checker compare texts?
- It uses the Myers diff algorithm — the same one used by Git, GitHub, and VS Code. It finds the shortest edit script (minimum insertions and deletions) to turn one text into the other, producing a clean comparison without false positives.
- Does this tool upload my text to a server?
- No. Both texts are compared entirely in your browser tab using about 120 lines of vanilla JavaScript. Nothing is uploaded, logged, or analyzed externally. Close the tab and your data is gone.
- What view modes and granularity options are available?
- You can view diffs in side-by-side, unified (git-style), or inline mode. Comparison granularity can be set to lines, words, or characters. You can also ignore whitespace, case, or empty lines to focus on meaningful changes.
- What are typical use cases for a diff checker?
- Common uses include comparing config file versions, verifying legal contract revisions word-by-word, spotting single-character typos in API keys or URLs, seeing what changed between AI-generated drafts, and generating shareable patches without committing to Git.
- Is this diff checker really free?
- Yes, 100% free with no restrictions. There is no signup, no file-size limit, no usage cap, and no premium tier. You can compare texts as often as you need. The tool is ad-supported only.