Skip to content

Text compare (diff checker)

Paste the original and the changed version side by side and see at once which lines were added, removed or edited. The comparison runs in this browser only — your text is never uploaded.

Runs in your browser · Nothing uploadedFree · No install

Text compare (diff checker)

Highlight

Differences

Put text in both boxes and the differences appear here.

    How to use

    1. 1Paste the original text into the first box and the changed text into the second.
    2. 2Choose ignore case, ignore whitespace and whether changes are highlighted by word or by character.
    3. 3Read the result below: − lines were removed, + lines were added. Long unchanged stretches are folded; press the button to expand them.

    About this tool

    How to read the result

    The result runs from top to bottom in the order of the changed text. The two numbers at the start of each row are the line number in the original and in the changed text. Rows with a red background and a − sign exist only in the original (removed); rows with a green background and a + sign exist only in the changed text (added).

    When a single line was edited, its old version (−) and new version (+) are shown as a pair, and only the words or characters that actually differ are highlighted inside them. That makes a moved comma or a changed digit easy to spot in a long paragraph. The −/+ markers and line numbers are always shown too, so the result never relies on colour alone.

    Long runs of unchanged lines are folded: three lines of context stay visible before and after each change, and a “Show n unchanged lines” button reveals the rest when you need more context.

    Line, word and character comparison

    The tool first lines the two texts up line by line to find which lines were added, removed or edited. Each edited pair of lines is then compared again at the level you pick under “Highlight”.

    • Words: changes are highlighted as whole words and punctuation marks. This is the most readable choice for prose, reports, contracts and translations, because a rewritten phrase shows up as one block instead of scattered letters.
    • Characters: every character is compared, so a single typo, a swapped letter or one wrong digit in a serial number is pinpointed exactly. Emoji and accented letters are treated as one character, the way you see them.
    • For very long line pairs (more than 2,000 characters together) the tool highlights by word even when Characters is selected, which keeps the page responsive.

    When to ignore case or whitespace

    • Ignore case treats “Report” and “REPORT” as the same line. Use it for headings that were only re-capitalised, or for configuration files and lists where letter case does not matter.
    • Ignore whitespace trims spaces at both ends of every line and treats any run of spaces or tabs inside a line as one space. Re-indented code, or text where a copy-and-paste doubled the spaces, then only shows real content changes. Removing a space entirely (“a b” → “ab”) is still reported as a difference.
    • Both options only loosen the comparison. The result always shows the lines exactly as they appear in the changed text.

    Typical uses

    Differences in line endings (Windows CRLF versus macOS and Linux LF) and a single trailing newline at the end are not counted as changes.

    • Checking what a colleague or editor changed in a draft, a cover letter or a contract without rereading every sentence.
    • Reviewing a new version of terms, a policy, a translation or an announcement before you publish it.
    • Comparing lists, CSV columns copied from a spreadsheet or configuration files to see what is missing or new.
    • Comparing snippets of code; with ignore whitespace on, indentation changes disappear and only logic changes remain.

    Your text stays in your browser

    Everything is computed inside this browser. The first comparison downloads the comparison engine (the open-source jsdiff library) from this site once; the text you paste is never sent to a server, logged or stored. That makes the tool safe for contracts, internal documents and other sensitive writing.

    Each box accepts up to 300,000 characters and 20,000 lines. If two texts are so different that the detailed comparison cannot finish within two seconds, the identical beginning and end are kept and the differing middle is shown as one removed block followed by one added block.

    Frequently asked questions

    Can I compare Word or PDF files directly?

    There is no file upload. Copy the text out of each document and paste it into the boxes; the tool compares the words, not fonts, bold text or other formatting.

    How are changes inside a line shown?

    An edited line appears as a − row (original) directly followed by a + row (changed text), with only the differing words or characters highlighted. Switch Highlight to Characters for letter-level detail.

    Does moving a line count as a change?

    Yes. The texts are aligned in order, so a moved line shows as removed in one place and added in another. To compare two lists regardless of order, sort both with a line sorter first and then compare them.

    I turned on ignore whitespace but still see a spacing difference.

    Ignore whitespace trims line ends and collapses runs of spaces, but deleting a space between two words is still a real change. Highlights inside edited lines also show the original spacing.

    Is my text uploaded or saved?

    No. The comparison runs in your browser and the text is never sent anywhere. Closing the page discards it.

    How long can the texts be?

    Up to 300,000 characters and 20,000 lines per box. When the texts differ in too many places, the differing part is shown line by line only, and a note above the result says so.

    All everyday tools (16) →