Text · free tool

Diff online for text, JSON and code comparison

Compare two texts, JSON snippets or code blocks by line, word or character and highlight aligned additions and removals.

  • Text, JSON and code
  • Line, word or character diff
  • Local file import and .diff export
  • Private browser processing

Your tool

Online Diff Checker

Read locally · never uploaded
Read locally · never uploaded
Comparison result

Good to know

An online diff checker aligns two versions and identifies shared, added and removed content at line, word or character level.

diff onlineonline diff checkerdiff checkertext comparisoncompare text

Understand

Understand Online Diff Checker

What is Online Diff Checker?

An online diff checker aligns two versions and identifies shared, added and removed content at line, word or character level.

Main use case: Compare two snippets of text, code, JSON or documentation and identify insertions and deletions without losing alignment after a changed line.

Common use cases

Code review
Compare snippets before committing or sharing.
Content edits
Spot changes between two drafts.
JSON inspection
Compare equally formatted payloads from two API responses.
QA output
Compare expected and actual text while preserving unchanged line alignment.

How to use the tool

  1. Paste the old version.
  2. Paste the new version.
  3. Choose line, word or character comparison.
  4. Ignore horizontal whitespace only when formatting is irrelevant.
  5. Review or copy the highlighted differences.

Best practices

  • Format both JSON inputs consistently.
  • Use line mode for code, word mode for prose and character mode for small changes.
  • Keep whitespace significant for Python, YAML and indentation-sensitive formats.
  • Compare a focused section when documents are very large.

Common mistakes

Comparing minified and formatted JSON
Formatting noise can hide the meaningful value and property changes.
Ignoring meaningful whitespace
Indentation changes can be significant in code and structured formats.
Comparing only matching indexes
A real diff algorithm must realign shared content after an insertion or deletion.

FAQ

Frequently asked questions

What does a diff checker show?

It aligns two versions and highlights content that was added, removed or left unchanged.

What is the difference between line, word and character comparison?

Line mode suits code and files, word mode makes prose edits readable and character mode reveals very small spelling or punctuation changes.

Can I compare JSON?

Yes. Format both JSON inputs with the same indentation first for a clearer line-by-line comparison.

Should whitespace be ignored?

Ignore horizontal whitespace when formatting changes are irrelevant. Keep it enabled for indentation-sensitive code or data.

Why does an inserted line not mark every following line as changed?

The diff algorithm finds shared content and realigns it after insertions or deletions instead of comparing only identical line indexes.

Does the diff checker modify my text?

No. It reads both inputs and renders a separate comparison locally in the browser.

Are my inputs sent to a server?

OnSubmit tools run in the browser whenever the task can be processed locally. Avoid pasting production secrets, real banking details or personal data into public tools.