EVMTools

Diff Checker

Compare two texts and see the differences highlighted line by line. Online diff tool with added, removed, and unchanged line detection.

Examples

About Diff Checker

This diff checker compares two texts line by line using the Longest Common Subsequence (LCS) algorithm, the same approach used by Git and other version control systems. Added lines are shown in green, removed lines in red, and unchanged lines have no highlighting.

All processing happens locally in your browser. No data is sent to any server.

How to Use This Diff Checker

This free online diff checker helps you compare two texts and identify exactly what changed. Whether you are reviewing code changes, comparing document versions, or checking configuration updates, follow these steps:

  1. Paste the original text in the left text area. This is the base version you want to compare against.
  2. Paste the modified text in the right text area. This is the updated version with changes.
  3. Review the diff output below. Added lines are highlighted in green, removed lines in red, and unchanged lines are plain.
  4. Use the stats summary to quickly see how many lines were added, removed, and unchanged.

Click "Swap Sides" to reverse the comparison direction. Everything runs locally in your browser.

Common Use Cases

  • Code review — Compare two versions of source code to understand what changed between commits or branches.
  • Configuration comparison — Find differences between development and production configuration files.
  • Document versioning — Compare drafts of documents, contracts, or specifications to track edits.
  • API response comparison — Diff API responses to detect changes in data structures or values.
  • Smart contract auditing — Compare contract versions to identify modified functions and logic changes.

Related Tools

Frequently Asked Questions

How does the diff checker work?

The diff checker uses the Longest Common Subsequence (LCS) algorithm to compare two texts line by line. It identifies lines that were added (present only in the modified text), removed (present only in the original), and unchanged (identical in both). This is the same algorithm used by Git and other version control systems.

What do the colors mean?

Green lines with a + prefix indicate lines that were added in the modified text. Red lines with a - prefix show lines that were removed from the original text. Lines without highlighting are unchanged between the two versions.

Can I compare code with this tool?

Yes. The diff checker works with any text, including source code in any programming language. It uses a monospace font for proper code alignment and preserves whitespace. It is commonly used to compare code changes, configuration files, and documentation.

What are the line numbers on the left?

The two columns of numbers show the line position in each text. The left column shows the line number in the original text, and the right column shows the line number in the modified text. Added lines only have a right number, removed lines only have a left number.

Is there a size limit?

There is no strict size limit, but very large texts (over 10,000 lines) may cause slower performance since the diff algorithm runs in your browser. For typical use cases like comparing documents, config files, or code snippets, performance is instant.