Advertisement
Text Tools

Text Compare (Diff Checker)

Paste two versions of a text, or upload two files, to compare text online. The diff checker shows them side by side, highlights every changed word or character, and counts lines added, removed and changed. It works for documents, code, config files and JSON.

  • Side by side or unified
  • Word and character highlights
  • Compare two files
  • JSON diff with sorted keys
  • Ignore case, spaces, blanks
Up to 5,000 lines per side.
Advertisement
How to use

How to use the text compare tool

  1. 1

    Add both versions

    Paste the original on the left and the changed text on the right, or upload two files.

  2. 2

    Pick how to compare

    Choose side by side or unified view, and word or character highlighting.

  3. 3

    Ignore what does not matter

    Ignore case, whitespace or blank lines, or tick Compare as JSON to diff data structures.

  4. 4

    Read the differences

    Red shows removed text and green shows added text. Tick Show only changes to hide identical lines.

Compare text online

How the text compare tool finds differences

This text compare tool lines up two texts and finds the smallest set of changes that turns the first into the second. It uses the longest common subsequence (LCS) method, the same idea behind git diff and the Unix diff command. First it matches whole lines, then inside each changed line it runs a second pass to highlight the exact words or characters that differ.

The result tells you, at a glance:

  • Unchanged lines that appear in both versions.
  • Changed lines, shown as a pair with the edits highlighted in red (removed) and green (added).
  • Removed lines that only exist in the original, and added lines that only exist in the new version.
  • A similarity percentage based on the share of unchanged lines.

Each side can have up to 5,000 lines, enough for long contracts, chapters, source files and exports.

Diff checker views

Side by side and unified diff

The side by side view puts the original on the left and the new version on the right, with line numbers on both sides. Changed lines sit on the same row so you can read across, and empty grey cells show where lines were added or removed. It is the easiest way to review edits to an article, a contract or a translation.

The unified view shows a single column with - and + markers, like a patch file or a pull request. It is more compact on small screens and when changes are spread out.

Switch Highlight changes by to Character to catch tiny edits such as a changed digit in a price, a missing comma or a swapped letter. Keep it on Word for prose so a rewritten phrase shows as one highlight rather than a scatter of letters. Tick Show only changes to collapse long runs of identical lines.

Advertisement
Compare files, JSON and code

Compare files, JSON and code

Instead of pasting, upload two files to compare files directly: text, Markdown, CSV, HTML, XML, YAML, logs and source code up to 1 MB each.

For a JSON diff checker, tick Compare as JSON. Both sides are parsed, formatted with the same indentation and their keys are sorted, so two objects with the same data in a different key order count as identical and only real value changes are highlighted. Invalid JSON is reported with its line and column. For deeper JSON clean-up use the JSON formatter.

As a code diff checker, Ignore whitespace differences hides changes in indentation and trailing spaces, which is handy after a reformat. Ignore case helps with SQL keywords and HTML tags, and Ignore blank lines skips empty lines added or removed between blocks.

Use cases

When to use a text diff

  • Editing and proofreading: see exactly what an editor, a client or an AI rewrite changed in your copy.
  • Legal and policy documents: compare two versions of terms, a contract or a privacy policy line by line.
  • SEO: check what changed on a page between two crawls or snapshots. To score overall overlap between pages, use the duplicate content checker.
  • Developers: compare config files between servers, API responses between environments, or two versions of a script without a repository.
  • Data: compare two exports to see which rows were added or removed. Clean them first with Remove Duplicate Lines.

Your texts are compared on the server for this request only and are never stored.

Tips

Tips for cleaner comparisons

Copying text from PDFs, web pages and Word often adds invisible differences: different line breaks, non-breaking spaces or curly versus straight quotes. If two texts look the same but the tool shows many changed lines, tick Ignore whitespace differences first. For long documents, compare section by section, and use character mode to find the exact spot where a number or a name changed.

FAQ

Text Compare (Diff Checker): frequently asked questions

How do I compare two texts online?

Paste the original text in the left box and the changed text in the right box, then click Compare text. Differences are highlighted side by side.

What is a diff checker?

A diff checker compares two pieces of text and shows the differences between them: lines and words that were added, removed or changed.

Can I compare two files?

Yes. Use the upload buttons under each box to compare two text or code files of up to 1 MB each.

How do I compare two JSON objects?

Paste both JSON documents and tick Compare as JSON. They are formatted and their keys sorted before comparing, so key order does not create false differences.

Can I ignore whitespace or case?

Yes. Tick Ignore whitespace differences, Ignore case or Ignore blank lines before comparing.

What is the difference between side by side and unified view?

Side by side shows both versions in two columns with matching lines on the same row. Unified shows one column with minus and plus markers, like a patch file.

How is the similarity percentage calculated?

It is the number of unchanged lines divided by the line count of the longer text, so 100% means identical.

Is my text saved?

No. Both texts are processed in memory to build the comparison and are discarded afterwards.

About Text Tools

More about our text tools

Text tools for writers, editors, marketers and anyone cleaning up lists: change case, remove duplicate lines, compare two versions of a document, and generate placeholder copy.

Built for lists and long documents

These tools are designed for pasted lists of thousands of lines and full-length documents, not just a sentence or two. Line-based tools keep your original order unless you ask for sorting.

Unicode-aware

Case conversion, de-duplication and comparison use multibyte-safe functions, so accented letters, non-Latin scripts and emoji are handled correctly instead of being mangled.

Nothing is stored

Your text is processed for the current request only. Close the tab and it is gone.