Text Diff Checker – Compare Two Texts Side by Side
Paste the original text on the left and the modified version on the right to see exactly what changed. Choose line, word or character level, toggle ignore whitespace and ignore case, and switch between side-by-side and unified views. Free, private, and runs entirely in your browser.
Compare inputs
Original on the left, modified on the rightDiff output
Run a comparison to see resultsYour diff will appear here
Paste two texts above and click Compare to see the differences.
What does this Text Diff Checker do?
This free online text diff checker compares two versions of text and shows you exactly what changed. Paste the original in the left panel and the modified version in the right, click Compare, and the tool highlights additions in green and deletions in red — instantly, with no server round-trip.
Unlike a simple character counter, a diff checker understands structure. It matches lines that stayed the same and only marks what actually changed. This makes it useful for reviewing code edits, checking document revisions, comparing configuration files, or spot-checking a translation. It is effectively a browser-based equivalent of the Unix diff command and the git diff output.
Everything runs locally in your browser. The texts you paste never leave your device, there is no signup, and there are no usage limits. Compare as many texts as you want, as many times as you want.
How to compare two texts and find differences
- Paste the original text into the left panel. This is your "before" version.
- Paste the modified text into the right panel. This is your "after" version.
- Choose comparison options. Pick line, word or character level. Toggle ignore whitespace and ignore case if you want to filter out noise.
- Click Compare. The diff engine highlights additions in green, deletions in red, and shows unchanged lines as context. The stats bar shows added, removed, unchanged counts and a similarity score.
- Switch views. Side-by-side shows original and modified in parallel columns. Unified combines both into a single column with
+and-prefixes, likegit diff. - Copy or download. Copy the diff output to your clipboard or download it as a
.difffile in standard unified diff format.
Line, word or character — which one should you use?
The comparison always starts by matching lines. The detail mode decides what gets marked inside a line that counts as changed.
| Mode | What it does | Best for |
|---|---|---|
| Line | Marks a changed line as a whole. Fastest option. | Code, logs, config files, structured text where line breaks carry meaning |
| Word | Highlights only the words that changed inside a line. | Articles, contracts, translations, prose — the default choice for most text |
| Character | Takes the difference down to single characters. | Identifiers, hashes, long numbers, spotting a single changed digit or typo |
If you are not sure, start with Word mode. It gives you the most useful level of detail for everyday text. Switch to Line for code and Character for precise edits.
Why use this Text Diff Checker?
| Feature | What it gives you |
|---|---|
| Instant comparison | The diff runs entirely in your browser, so results appear the moment you click. No server round-trip, no waiting. |
| Three comparison modes | Compare by line, word or character. Choose the level of detail that matches your task. |
| Side-by-side + unified | Read the diff in parallel columns or as a single unified stream with + and - prefixes, like git diff. |
| Ignore whitespace & case | Filter out indentation, spacing and capitalisation differences when they are not what you are looking for. |
| 100% private | Everything runs in your browser. Your texts never leave your device — no server, no logs, no tracking. |
| Works offline | Once the page loads, you can compare texts without an internet connection. Bookmark it for offline work. |
Who uses a text diff checker?
This online text diff tool is used by developers, editors, writers, translators and anyone who reviews revisions. Some of the most common use cases:
Developers and programmers
- Review code changes before committing or opening a pull request.
- Compare configuration files (JSON, YAML, INI) between environments.
- Check generated output against expected output during debugging.
- Spot differences in SQL migrations, Dockerfiles or CI configs.
- Verify that a refactor changed only what it was supposed to.
Writers, editors and students
- Compare two drafts of an article, essay or report.
- Check what changed between a client's first and second version of a document.
- Verify that a translation matches the source structure.
- Spot accidental deletions or additions during editing.
- Track revisions in collaborative writing projects.
SEO and content teams
- Compare meta descriptions, title tags or on-page copy before and after an update.
- Audit content changes after a site migration.
- Check that a rewritten page preserved key information.
- Compare competitor content updates over time.
Legal and administrative work
- Compare contract versions to spot clauses that changed.
- Verify that a policy update changed only the intended sections.
- Check form letters or templates for unintended edits.
- Review translations of legal documents line by line.
How the diff algorithm works
This tool uses the Myers diff algorithm — the same algorithm behind git diff, GNU diff, and most professional diff tools. It is mathematically guaranteed to return the shortest list of changes that transforms one text into the other, so you are never shown a change that did not happen.
At a high level, the algorithm builds a table comparing both texts and finds the longest common subsequence (LCS). Everything outside that subsequence is either an addition or a deletion. When you enable word or character-level diff, the same algorithm runs a second time inside each changed line pair to pinpoint exactly which tokens changed.
This is not a crude "line by line comparison" — it understands insertions, deletions and rearrangements, so the result is as accurate as the diff you would see in a version control system.
Text diff best practices
- Use line mode for code. Line breaks carry meaning in code, logs and structured data. Line mode gives you the cleanest view.
- Use word mode for prose. Articles, contracts and emails read better when only the changed words are highlighted.
- Use character mode for precision. When a single digit in an ID, hash or version number matters, character mode catches it.
- Ignore whitespace when indentation is noise. If one version uses tabs and the other uses spaces, turn on Ignore whitespace to focus on real changes.
- Ignore case when capitalisation is irrelevant. Useful for comparing data exports where case may differ but meaning is the same.
- Download the .diff for sharing. The unified diff format is universally understood and can be applied with
patchorgit apply.
If you need to format the text before comparing — for example, to normalise JSON or CSS — use our JSON Formatter or CSS Formatter first, then paste the clean output here.