Copynix

Text Diff Checker β€” Compare and Find Differences Between Two Texts Online

Frequently Asked Questions

What is a text diff?

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.

What algorithm does this diff tool use?

This tool uses a line-by-line longest common subsequence (LCS) algorithm to identify differences, similar to the Unix diff utility and Git.

Can I compare code files with this tool?

Yes. This tool works great for comparing code, configuration files, documents, or any plain text. Paste the content directly into both fields.

What do the colors in the diff result mean?

Green lines were added in the modified text. Red lines were removed from the original. Unchanged lines appear without any color.

Can I use this diff tool for comparing code files?

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.

What is the difference between a line diff and a character diff?

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.

Can I save or export my diff results?

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.

How to use

  1. 1

    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.

  2. 2

    Paste the modified text

    Put the new (after) version in the right field. The diff calculation starts automatically as you type or paste.

  3. 3

    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.

  4. 4

    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.

Use cases

  • 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.

Related Tools

Regex

Test regex with highlighting

JSON

Format & minify JSON

HTML Entities

HTML encode & preview

URL Encode

URL encode & decode

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.