Skip to content

Compare two texts (diff checker)

Paste two versions of a text or code file and see added, removed and changed lines and words highlighted, compared in your browser.

0 lines
0 lines
Add text on both sides to compare.
Runs in your browser · no uploadHow it works

How to use Text diff checker

  1. 1

    Add both versions

    Paste the original on the left and the changed text on the right, or open or drop a file on each side.

  2. 2

    Pick how to compare

    Choose side-by-side or unified view, word or character highlights, and whether to ignore whitespace or case.

  3. 3

    Walk through the changes

    Use the arrows or N and P to jump between changes, and expand folded lines when you need more context.

  4. 4

    Save the result

    Download a .patch file or copy the unified diff to share it or apply it with Git.

Limits and Pro

Free with no sign-up: open text or code files up to 20 MB each and compare tens of thousands of lines; a comparison that would take more than 8 seconds is stopped with a message.

Pro removes the ads; comparison size is limited only by your device's memory. See Pro

About Text diff checker

Spotting what changed between two drafts of a contract, two versions of a config file or two exports of the same spreadsheet is slow and error-prone by eye. Paste or drop both versions and this checker lines them up, colouring removed lines red, added lines green and lines that were edited in both colours, with the exact words or characters that differ picked out inside each line.

Side by side suits prose and contracts; the unified view stacks removed and added lines the way Git and code review tools do. Choose word-level highlighting for writing, character-level for codes, IDs and numbers, or line-level when you only care which lines moved. Ignoring whitespace hides re-indented code and trailing spaces; ignoring case treats “Total” and “TOTAL” as the same.

Long unchanged stretches fold away to three lines of context so the changes stand out, and the arrows (or N and P on the keyboard) jump from one change to the next. The comparison runs in a background thread using the Myers algorithm from the open-source jsdiff library, so files of 10,000 lines and more stay responsive; very large results are drawn on demand as you scroll.

When you are done, download the differences as a standard unified .patch file that git apply and patch understand, or copy it to the clipboard. The checker compares plain text: it does not read Word, PDF or image files, and it shows moved paragraphs as a removal plus an addition rather than as a move.

Privacy

Both texts and any files you open are read and compared by this page in your browser; nothing is uploaded. The last comparison is kept in local storage only while the two texts together stay under 400,000 characters, so a large or sensitive file is never saved.

Features

Side-by-side or unified

Two-column view for documents, Git-style unified view for code, both with line numbers.

Word and character highlights

See exactly what changed inside a line, not just that the line is different.

Built for big files

A background worker and on-demand rendering keep 10,000-line comparisons smooth.

Standard .patch export

Unified diff with three lines of context, ready for git apply or code review.

Text diff checker: frequently asked questions

How do I compare two documents for differences?
Paste the first version into the Original box and the second into the Changed box, or open a file on each side. The differences appear instantly below: red for text that was removed, green for text that was added. Switch to character highlighting if you need to catch a changed digit in a number or a single letter in a name.
What does ignore whitespace do?
It treats lines as equal when they differ only in spaces, tabs or indentation, so re-indented code, trailing spaces and double spaces after full stops stop showing up as changes. Line breaks still count, so a paragraph split into two lines is reported. Turn it off when spacing matters, for example in Python code or fixed-width data.
Can I compare code files and download a patch?
Yes. Open source files such as .js, .py, .json or .yml on each side, choose the unified view and character or word highlights, and use the .patch button. The download is a standard unified diff with three lines of context and file headers, so git apply, patch and most code review tools can read it.
Is there a limit on file size or number of lines?
Each file can be up to 20 MB, and comparisons of 10,000 to 50,000 lines usually finish in well under a second because the work happens in a background thread. If two large files are almost completely different, the comparison is stopped after eight seconds; comparing smaller sections, or using line mode, avoids that.
Does the diff checker upload my text?
No. The comparison runs in your browser, so confidential contracts, source code or data never reach a server. The last pair of texts is remembered in this browser's local storage for convenience, but only when they are small; clearing both boxes or using a private window leaves nothing behind.
All text tools