Text Diff
Compare two texts
Frequently Asked Questions
How do I compare two texts to find differences?
Paste the original text on the left and the modified text on the right. The tool highlights: additions (green), deletions (red), and changes (yellow). View differences inline or side-by-side. Results show total changes, additions, and deletions.
What is the difference between line-level and word-level diff?
Line-level: Compares entire lines, marking whole lines as added/removed. Best for code comparison. Word-level: Highlights individual changed words within lines. Best for document comparison. Character-level: Shows exact character changes. Choose based on your content type.
Can I compare two files for differences?
Upload two text files or paste their contents. The tool supports: plain text, code files, CSV, JSON, XML, and Markdown. Maximum file size: 5MB per file. For binary files (images, PDFs), use specialized comparison tools instead. The tool works with any text-based format.
How do I read a unified diff output?
Lines starting with - (minus) are removed from the original. Lines starting with + (plus) are added in the new version. Lines without a prefix are unchanged context. @@ markers show line numbers. This format is standard in Git and version control systems.
Can I generate a patch file from the diff?
Yes. The tool exports differences in unified diff format, compatible with Git and the patch command. Apply the patch: patch original.txt diff.patch. This is useful for sharing specific changes without sending the entire file.