A text diff compares two versions of text and shows what was added, removed, or unchanged between them. It is the same concept used by Git to show changes between commits.
This tool uses a line-by-line longest common subsequence (LCS) algorithm to identify differences, similar to the Unix diff utility and Git.
Yes. This tool works great for comparing code, configuration files, documents, or any plain text. Paste the content directly into both fields.
Green lines were added in the modified text. Red lines were removed from the original. Unchanged lines appear without any color.
Yes. Paste any plain text including source code, configuration files, JSON, YAML, SQL, or any text format. For large files, paste only the relevant sections for a focused comparison.
A line diff highlights changed lines (what this tool shows). A character diff highlights the specific characters that changed within each line. Git uses line diff by default; 'git diff --word-diff' shows word-level changes.
This tool is stateless β results are not saved between sessions. To preserve a diff, copy the result text, take a screenshot, or open your browser's print dialog (Ctrl+P) to save as PDF.
Text comparison is essential for code review, document editing, and debugging. This diff tool highlights exactly which lines changed between two versions of any text β the same underlying algorithm used by Git and the Unix diff command.
Paste the original text
Put the original (before) version of your text in the left field. This can be code, configuration, a document, a log file, or any plain text.
Paste the modified text
Put the new (after) version in the right field. The diff calculation starts automatically as you type or paste.
Read the highlighted result
Green lines were added in the modified version. Red lines were removed from the original. Unchanged lines appear without any background color.
Use the swap button
Click Swap to exchange the original and modified fields β useful when you want to see the diff from the reverse direction or undo an accidental paste.
Review configuration changes
Before deploying a configuration update, diff the old and new versions to confirm only the intended changes were made and no unintended modifications crept in.
Compare API responses
When debugging an API behavior change, paste the old and new responses to see exactly which fields changed, appeared, or disappeared between versions.
Proofread document revisions
Paste two versions of a document, email, or article to see precisely what changed β useful for tracking edits in legal documents, policy text, or technical writing.
Text diffing compares two documents and identifies which lines were added, removed, or unchanged. It is the same algorithm that powers git diff, code review tools like GitHub's pull request view, and merge conflict resolution in version control systems. The Myers diff algorithm, first published in 1986, remains the standard approach for computing the minimum edit distance between two texts.
Common uses include comparing two versions of a configuration file to find what changed, reviewing a before/after edit in documentation, validating that a code transformation produced the expected result, or spotting unintended differences between two API responses. Paste any two blocks of text and this tool renders a side-by-side view with added lines highlighted in green and removed lines in red, making differences immediately visible.