Compare text line by line

Paste an earlier version and a revision to locate which whole lines changed.

This tool preserves spaces and punctuation. It compares lines, not meaning or individual edits inside a line.

Each side is limited to 50,000 JavaScript string units and 1,000 lines. Over-limit input stays intact and is not compared; split it into smaller parts.

Text is processed in your browser and is not uploaded or saved. Refreshing clears it.

Up to 50,000 JavaScript string units and 1,000 lines per side. Whitespace differences are kept; line-ending styles are normalized before comparison.

How to compare two text versions

  1. Paste the earlier text into Original text and the revised version into Revised text.
  2. Choose Compare text to see added, removed and unchanged lines. A changed line appears as the removal of the old line and the addition of the new one.
  3. Select Show changes only to hide unchanged lines. Copy comparison report includes the full report, including unchanged lines.

How the comparison works and its limits

The tool compares whole lines. It does not interpret meaning or highlight edits inside a line. Spaces, tabs, letter case and trailing blank lines can all affect the result. Windows, Mac and Unix line endings are normalized before comparison.

Each side can contain up to 50,000 JavaScript string units and 1,000 lines. Some emoji use multiple units. If a limit is exceeded, the input is kept and the tool asks you to compare a smaller part; it does not truncate text. You can compare one side with the other left empty.

Editing or swapping either side clears the previous result, so compare again. Text is not kept after you refresh or leave. Save important originals elsewhere. The report's line numbers and labels help you review changes; the output is not a patch file for applying code edits.

Related text tools

To check the length of a passage, use the word counter. To format or validate JSON text, use the JSON formatter.

How to Compare Two Text Versions and Read the Changes

Back to tool

Start with two saved versions

Use the original side for the earlier text and the revised side for the newer text. This is useful when you are checking a notice, policy, draft or plain-text configuration and want to see where a full line changed. The comparison works with text you paste; it does not open Word, PDF or other document files.

You can leave one side empty to see all lines in the other side as additions or removals. If you are comparing a long document, start with the section that changed. Smaller inputs are easier to review, and over-limit input is kept intact. If either input exceeds a limit, comparison stops and asks you to split the text into smaller sections.

Read additions, removals and line numbers

The result marks each line as unchanged, added or removed. A line number on the left refers to the original version; a number on the right refers to the revision. A dash means that the line exists on only one side. When a line is edited, the tool shows the old line as removed and the new line as added. It does not try to guess which words replaced one another.

Use Show changes only to hide unchanged lines while reviewing. The summary counts added, removed and unchanged rows. Copy comparison report includes every row, even when unchanged lines are hidden in the on-screen view. This can help preserve context when you share the report with someone else.

Example: a workshop notice changes its date and ticket instructions

Suppose the original notice says “Workshop: 14 June”, “Doors open at 9:00” and “Bring a printed ticket”. The revision changes the date to 15 June and says to bring a ticket on a phone. The middle line stays the same, while the first and third lines are replaced.

The result contains two removed lines, two added lines and one unchanged line. Check the line numbers to see which version each row came from. Before forwarding the report, confirm that the date and the instruction you intended to change appear in the added lines and that the unchanged context still belongs with them.

Illustrative line comparison for the workshop notice
Original lineRevised lineResult
1: Workshop: 14 June1: Workshop: 15 JuneRemoved, then added
2: Doors open at 9:002: Doors open at 9:00Unchanged
3: Bring a printed ticket3: Bring your ticket on a phoneRemoved, then added

Check spacing and blank lines before trusting a difference

The comparison keeps spaces, tabs, capitalization and punctuation. A trailing blank line is also part of the text, so two drafts that look similar in a narrow input box can still differ. If a line appears changed unexpectedly, compare the original text in a plain-text editor and check for leading spaces or an extra line break.

Windows, Mac and Unix line-ending styles are normalized before the comparison. That avoids reporting the same paragraph as changed only because one version uses a different newline encoding. The actual line content and blank lines remain significant.

Know what a line-by-line comparison cannot tell you

The tool does not compare words or characters within a line, explain why a change was made, or judge whether a revision is correct. A moved line may appear as a removal and an addition because its position changed. Repeated lines can also be matched in more than one reasonable way; review the surrounding lines when the placement matters.

Each side is limited to 50,000 JavaScript string units and 1,000 lines. Some emoji use more than one string unit. If an input exceeds a limit, it stays intact and an error asks you to split the comparison into smaller sections.

Copy the report and keep the source text

The comparison runs in this page. Text is not uploaded or saved automatically, and refreshing or leaving the page clears both sides and the result. Save the source drafts somewhere safe before you start.

If the browser blocks clipboard access, the tool lets you select the report and copy it manually. The report is a review aid with line numbers and status labels; it is not a patch file and does not modify either source version.

Updated