Smart Text Compare & Merge
Compare, analyze, and merge text, code, and documents with visual diff highlighting, similarity scoring, and smart conflict resolution.
How to use
Add your text
Paste content into both editors, or upload files directly — TXT, CSV, JSON, XML, SQL, HTML, CSS, JS and more under 1 MB are accepted. Click Sample for an instant code-diff demo.
Pick a comparison mode
Choose Line for code diffs, Word for prose tracking, Character for letter-precision, or Paragraph for document review. Switch modes anytime — the diff recomputes instantly.
Tune ignore options
Mask whitespace-only changes, case differences, punctuation, or blank lines to focus on the differences that matter. Combine multiple ignore options for the cleanest result.
Merge & export
For each detected conflict, pick Accept Left, Accept Both, or Accept Right. The Merged Output rebuilds live. Copy the merge, download as TXT, or export an HTML diff report for sharing.
When to use text comparison
Code reviews
Compare two versions of a file outside your IDE — useful when reviewing pasted snippets, blog tutorials, AI-generated code, or vendor library changes.
Editing & proofreading
Track your editor's revisions on an article, contract, or marketing copy. Word mode reveals every inline edit so you can confirm nothing important was lost.
Merging reviewer edits
Two reviewers returned conflicting edits on the same draft. Use Merge mode to pick the best of both — Accept Left, Right, or Both per conflict — then export the final version.
SEO content auditing
Compare the live page copy against your latest CMS draft to verify what actually shipped. Paragraph mode is ideal for long-form content audits.
CSV & data diffs
Spot row-level differences between two CSV exports or two API JSON responses. Useful for QA testing API changes or comparing two database snapshots.
Legal & contract review
Track every edit between contract drafts. Generate an HTML diff report to share with stakeholders or attach to email — colour-coded for instant readability.
How it works
LCS diff engine
Both inputs are tokenized per your chosen mode, then run through a Longest Common Subsequence algorithm to compute the minimal edit script — the smallest sequence of add/remove operations that transforms one input into the other.
Hunk grouping
Adjacent add/remove operations are grouped into 'hunks' — discrete conflicts you can resolve individually. Each hunk gets a unique ID and an editable choice (left, right, or both), tracked in component state.
Live merge
The merged output recomputes on every change. The engine walks the original op sequence: equal blocks pass through unchanged, and each hunk emits whichever side(s) you selected — joined with the right separator for your chosen mode.
100% browser-side
All tokenization, diffing, merging, and report generation runs in your browser tab — no uploads, no server. Files you drop in are read with the FileReader API and never leave your device.
Related tools
Frequently asked questions
Quick answers about this free online tool.
