Free Text Diff Checker
Paste two texts and instantly see every addition, deletion and change — line by line. Split view or unified view. No sign-up, 100% private.
About the Text Diff Checker
The Tool Empire Text Diff Checker compares any two pieces of text and instantly highlights every line that was added, removed, or left unchanged. It works equally well for prose documents, code files, configuration files, JSON data, contracts, emails, and anything else you can paste as plain text.
Additions are shown in green and deletions in red, with the unchanged context lines in between so you always have orientation within the document. Choose between Split view — original on the left, revised on the right — or Unified view, which shows a single column with + and − prefixes, similar to a Git diff output.
Two optional flags help you focus on what matters: Ignore case treats uppercase and lowercase as identical, and Ignore whitespace strips leading/trailing spaces so pure formatting changes don't clutter the result. The stats bar at the bottom reports lines added, removed, unchanged, and a similarity percentage so you can quickly gauge how much of the document changed.
Privacy first
All comparison logic runs locally in JavaScript — your text is never transmitted to any server. This makes it safe to compare confidential drafts, proprietary code, legal documents, or patient notes.
How to Use the Diff Checker
Behind the Scenes
The diff engine uses the Longest Common Subsequence (LCS) dynamic programming algorithm — the same fundamental approach used by Unix diff and Git. Here's how it works step by step:
Step 1 — Split into lines
Both texts are split on newline characters (\n) to produce two arrays of strings. Each element is a single line.
Step 2 — Build the DP table
A 2D table of size (m+1) × (n+1) is filled where m and n are the line counts of the two texts. Each cell dp[i][j] stores the length of the longest common subsequence of the first i lines of text A and the first j lines of text B.
Step 3 — Backtrack to build the edit script
Starting from dp[m][n], the algorithm walks backwards through the table. A diagonal step (both indexes decrease by 1) means the lines are equal (eq). A step left means a line was added in B; a step up means a line was deleted from A.
Step 4 — Render the result
Alpine.js renders the edit script as a reactive list. Each line gets a CSS class (add, del, or eq) which applies the colour-coded background and left border.
Use Cases
Writers & Editors
Compare a first draft against an edited version to see exactly what an editor changed — without needing Microsoft Word's Track Changes feature. Useful for freelancers reviewing editor revisions before accepting them.
Software Developers
Compare code snippets, configuration files, JSON responses, SQL scripts, or log files between two versions. The monospace font and line-level precision make it ideal for spotting regressions in output.
SEO & Content Teams
Compare an original page's body copy against a rewrite to ensure key phrases are preserved, no accidental deletions occurred, and the character count change is within expected bounds before pushing to production.
Legal & Contract Review
Identify exactly which clauses were added, removed, or modified between two contract versions. The privacy-first design means sensitive legal text never leaves your device.
Students & Academic Writers
Compare assignment drafts before and after tutor feedback. Check that all suggested edits were incorporated. Compare two sources for unintentional paraphrasing.
Translators
Compare source document revisions to identify exactly which sentences changed — so you only re-translate the modified portions rather than the entire document.