Text Diff Checker
Compare two blocks of text online to find additions, deletions, and line-by-line differences in standard unified diff format.
Run tool
The online text diff checker inspects two blocks of text, line by line, to highlight changes between versions. You can paste your initial draft or source text into the first field and the updated version into the second field. The tool computes a standard unified diff view that marks newly added lines with plus signs and removed lines with minus signs. You can also adjust the context lines setting to display more or fewer unchanged surrounding lines around each modification block. The default setting provides three lines of surrounding context. Along with the unified diff output, the tool reports exact metrics, including total lines in both versions, the number of added lines, the count of removed lines, and the overall change total. This provides a clear structural comparison for editing revisions, source code snippets, configuration files, lists, or updated documentation. Provide at least one non-empty text input to compute the comparison.
Instructions
- Paste or type your starting text into the Original text box.
- Paste or type your revised text into the Modified text box.
- Optionally adjust the Context lines field to control how many unchanged lines appear around diff blocks.
- Click the run button to compute the comparison between both inputs.
- Review the unified diff output alongside the counts for added lines, removed lines, and total changes.
Examples
- Comparing configuration changes: Original text contains 'port=8080' and 'timeout=30', while Modified text contains 'port=8080', 'timeout=60', and 'retries=3'. The resulting unified diff highlights '-timeout=30', '+timeout=60', and '+retries=3', reporting 2 added lines, 1 removed line, and 3 total changes.
- Reviewing an editorial revision: Original text contains 'Welcome guest' and Modified text contains 'Welcome member'. The comparison shows 1 line removed and 1 line added across the 1-line inputs.
FAQ
What format does the difference viewer use?
The tool outputs differences using standard unified diff formatting, displaying removed lines with minus signs and added lines with plus signs.
How does the context lines setting work?
Context lines define how many matching, unchanged lines are displayed around each modified section. The default value is 3, and you can adjust it up or down as needed.
What happens if both input text boxes are empty?
The tool requires at least one non-empty text field to perform a comparison. When both fields are empty, no difference calculation is performed.
Can I compare rich document files like PDF or DOCX directly?
The tool processes plain text input. Copy the text content from your documents and paste it directly into the text fields to run the comparison.