Text Diff Checker
Compare two texts and highlight the differences
Online Text Diff Checker
This tool compares two pieces of text side by side and highlights exactly what changed between them. Added lines are shown in green, removed lines in red, and unchanged lines in white. Use it to compare code versions, configuration files, documents, or any text.
How the Diff Is Computed
The comparison uses the Longest Common Subsequence (LCS) algorithm β the same algorithm underlying Git's diff engine. It finds the maximum number of lines that are identical between the two texts (in the same order), then marks everything else as added or removed. The result is a minimal diff that makes the least number of changes to transform the original into the new text.
Similarity Score
The similarity percentage at the top shows how alike the two texts are: 100% means identical, 0% means completely different. It is calculated as: unchanged lines Γ· total lines Γ 100.
Typical Uses
- Compare two versions of a code file before and after a change
- Review what changed in a configuration file (nginx.conf, .env, docker-compose.yml)
- Check differences between two API responses
- Proofread two drafts of a document
- Compare SQL query outputs