Diff Checker

Compare Two Texts and Spot Every Change

Paste your original and changed text to see exactly what was added, removed, or left unchanged.

0 / 500,000 characters
0 / 500,000 characters
Share

About the Diff Checker

This tool compares two pieces of text line by line using a longest common subsequence (LCS) algorithm and highlights exactly what changed. It's useful for reviewing edits to documents, comparing code snippets, or checking configuration files before and after a change.

Features:

  • Line-based diff using the LCS algorithm for accurate results
  • Unified and side-by-side comparison views
  • Options to ignore case and trailing whitespace
  • Privacy-first — your text is compared locally and never uploaded

How to compare two texts

  1. Paste the original text into the left box
  2. Paste the changed text into the right box
  3. Choose your options and click Compare
  4. Review the differences in unified or side-by-side view

Frequently Asked Questions

How does the diff algorithm work?

This tool finds the longest common subsequence (LCS) of lines between the two texts, then marks any line that isn't part of that shared sequence as added or removed.

What does 'ignore trailing whitespace' do?

It strips spaces and tabs from the end of each line before comparing, so differences that are only whitespace at line endings won't be reported as changes.

Is there a size limit on the text I can compare?

Each box accepts up to 500,000 characters. Very large inputs automatically fall back to a faster comparison method so the tool stays responsive.

What's the difference between unified and side-by-side view?

Unified view shows one column with added and removed lines marked by + and - prefixes, similar to a git diff. Side-by-side view shows the original and changed text in two aligned columns, which can be easier to scan for larger changes.

Can I copy the diff output?

Yes — use the copy button above the unified view to copy the diff in unified diff format, ready to paste into a text file, issue, or code review comment.

Does the diff work for code as well as prose?

Yes. Since the comparison is line-based rather than tied to any specific language, it works equally well for source code, configuration files, JSON, markdown, or plain prose.

Privacy

Both texts are compared entirely in your browser using JavaScript. Nothing is uploaded, transmitted, or stored anywhere.

Standards & References

Last updated: 2026-07-23