Text Diff Checker: Compare Two Texts and Find the Differences

Paste an original text and a changed text and see exactly what was added, removed or left alone, line by line. Use it for document revisions, code snippets, configuration files and lists. Highlighted results, change counts and options to ignore case and extra spaces.

Related Tools

Remove Duplicate Lines Alphabetical Order Sorter Word Counter Case Converter JSON Formatter & Validator All Utilities

What a diff checker does

A diff checker compares two pieces of text and shows the differences between them. It answers questions such as: what did my editor change, how do these two config files differ, which lines were added to this list, and did anything change in this contract between version one and version two. Instead of reading both texts side by side, you read one result in which changes are colored.

This tool compares line by line using a longest common subsequence algorithm, the same idea that underlies version control tools. Lines that appear in both texts stay in place, lines only in the original are marked as removed, and lines only in the changed text are marked as added.

How to compare two texts

  1. Paste the original text into the left box and the changed text into the right box.
  2. Choose whether to ignore extra spaces and capital letters.
  3. Press Compare.
  4. Read the summary, then scan the highlighted result: green lines were added and red lines were removed.
  5. Use Swap texts to reverse the direction of the comparison.

Reading the result

Each line of the result starts with a marker. A plus sign on a green background means the line exists only in the changed text. A minus sign on a red background means the line exists only in the original. Lines with no marker are the same in both texts. A line that was edited appears as one removed line followed by one added line.

Useful options

  • Ignore extra spaces: treats runs of spaces as one and ignores spaces at the start and end of lines. Good for text pasted from different programs.
  • Ignore case: treats Apple and apple as the same, so only real wording changes show.
  • Swap texts: switches original and changed, so additions become removals and the other way round.

Good uses for a diff checker

  • Comparing two drafts of an essay, article or contract.
  • Checking what changed in a configuration file, SQL script or code snippet.
  • Verifying that a list was cleaned or sorted without losing items.
  • Reviewing translations and subtitles against a source.
  • Spotting accidental edits in copied text.

Limits

The comparison works on whole lines and handles up to 3,000 lines on each side, which covers most documents and scripts. It does not highlight word-level changes inside a line. For software projects with history, a version control system such as Git is more suitable. As with all tools on this site, your text is compared in your browser and is not uploaded.

Getting a cleaner comparison

If every line shows as changed, the texts probably differ in invisible ways. Texts from Windows, Mac and Linux can use different line endings, and text copied from web pages can contain extra spaces or non-breaking spaces. Turn on Ignore extra spaces first. When you compare lists, sort both lists with the Alphabetical Order Sorter before you compare, so that the same items appear in the same order. When you compare long paragraphs, put each sentence on its own line, which makes the result much easier to read.

How to read the result

Marker Meaning
+ (green) Line added in the changed text
- (red) Line removed from the original text
(no marker) Line is the same in both texts

Frequently Asked Questions

How do I compare two texts?

Paste the original and the changed text into the two boxes and press Compare.

How do I see only the real changes?

Turn on Ignore extra spaces and Ignore case so that formatting differences do not show up.

Does it compare words or lines?

Lines. An edited line appears as one removed line and one added line.

Can I compare code?

Yes, for snippets and small files. Larger projects are better handled with Git or a code editor.

How many lines can I compare?

Up to 3,000 lines on each side.

Why does my text show every line as changed?

Different line endings or hidden spaces can make lines differ. Turn on Ignore extra spaces.

Is my text sent to a server?

No. The comparison happens in your browser.