Text Diff Checker

Compare two texts side by side and highlight differences.

Original
Modified
Paste text in both panels above to see the diff

Frequently Asked Questions

How does the text diff checker work?

The diff checker compares two blocks of text line by line (and optionally word by word) using a standard longest-common-subsequence algorithm. It highlights additions in green, deletions in red, and unchanged lines in the original color. This is the same core algorithm used by Git and other version control systems.

Can I compare code with this tool?

Yes — the diff checker works with any plain text including source code, configuration files, CSV data, and prose. It preserves whitespace and indentation, making it suitable for comparing code changes. For dedicated code comparison with syntax highlighting, see the Diff Checker in Developer tools.

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

The tool runs entirely in your browser, so the limit depends on your device's memory. In practice it handles texts up to several hundred thousand characters without issues. Very large files (10MB+) may cause temporary slowdowns on older devices.

Does the tool detect moved lines or reordered paragraphs?

The diff algorithm identifies inserted and deleted lines but does not explicitly track moved blocks. If you move a paragraph from one location to another, it will appear as a deletion at the old position and an addition at the new position. This is consistent with how standard diff tools work.

Is my text sent to a server for comparison?

No — all processing happens locally in your browser using JavaScript. Your text never leaves your device and no data is transmitted to any server. This makes it safe to compare confidential documents, passwords, API keys, or any sensitive content.