Input Text to Compare
About Text Diff Comparison
What is text diff comparison?
Text diff comparison (Diff) is a way to compare two text versions and find the differences between them. It is widely used in code version control, text file tracking, config file comparison, and other scenarios.
Comparison algorithm
This tool uses the Longest Common Subsequence (LCS) and Myers diff algorithms, the same algorithm used by Git diff. It accurately finds the minimal edits between two text segments and highlights the differences.
Comparison modes
- Side by side: places the two text versions in separate columns and highlights changed rows by color, great for review.
- Unified: merges and displays the differences like Git diff output, ideal for viewing all modifications at once.
- Character-level highlight: precisely highlights the characters that changed within each modified row.
Color legend
- β Green: new row (only in modified text)
- β Red: deleted row (only in original text)
- β Yellow: modified row (in both texts but with different content)
- β Gray: unchanged row
FAQ
Which comparison modes are supported?
Two modes are supported: Side by Side and Unified. Side by side places the two text versions in separate columns for comparison; unified merges and displays the differences with different colors, similar to Git diff output.
What do the colors in the results mean?
Green background indicates new rows (only in the right text); red indicates deleted rows (only in the left text); yellow indicates modified rows (in both texts but with different content); gray indicates unchanged rows.
Is my data safe?
Absolutely secure. All text comparison runs locally in your browser β no text content is ever uploaded to a server. Even if your text contains private code or files, nothing is transmitted.
Can I compare files?
Yes. Drag and drop or click the upload button to import files into the input panels. Text and code files are supported. File contents are read locally in your browser and never uploaded to a server.
What is character-level highlighting?
Character-level highlighting (Inline Diff) works inside a line. Instead of marking the whole row, it precisely highlights which specific characters changed. This is especially useful for small modified rows.