WEB TOOLS

Text Diff

Compare two texts line by line and highlight added, deleted, and changed content directly in your browser.

Your text is not sent to a server. All processing is performed locally in your browser.

Comparison Settings

Ignores leading/trailing whitespace and differences in repeated spaces or tabs. Inserting or removing a word-separating space still counts as a change.

Your text is not sent to a server. All comparison processing is performed locally in your browser.

Compare two versions of text

Compare before and after text side by side and identify added, deleted, and changed lines. Changed lines keep their row highlight while the actual changed text is emphasized in bold.

Your text is not uploaded to a server. Comparison runs locally in your browser.

When this tool is useful

Compare an earlier and revised draft, policy wording, or configuration text. Changed segments within a line are highlighted, making small edits easier to identify alongside added and removed lines.

How to use

  1. Enter or paste the original text in Before and the revised text in After. Each editor shows its line count and warns when the 2,000-line limit is exceeded.
  2. Optionally enable Ignore whitespace differences or Ignore letter case.
  3. Select Compare Text. Large comparisons display a progress message and are cancelled if the text or settings change.
  4. When comparison finishes, focus moves to the result heading. Use Next difference and Previous difference to visit changed lines in order, skipping unchanged rows. Edit the text or settings and select Compare Text again to refresh.

How differences are shown

Text is compared line by line. Lines found on only one side are shown as added or deleted. Corresponding lines with different content are shown as changed. Within changed lines, grapheme-level comparison highlights each changed segment in bold, including multiple separate changes on the same line.

Ignore whitespace differences

Ignores leading and trailing whitespace and differences in repeated spaces or tabs. Inserting or removing an internal separating space, such as “a b” versus “ab”, is still reported and highlighted. Line breaks still define separate lines.

Ignore letter case

Differences caused only by uppercase and lowercase letters are ignored.

Comparison size

Up to 2,000 lines can be compared on each side. Large comparisons split calculation and rendering into smaller tasks and can be cancelled by editing the input. Split very long documents into sections as needed. On a phone, before and after lines are stacked vertically rather than requiring a wide comparison table. Very long lines use a lighter inline-highlighting fallback.

FAQ

Is my text uploaded to a server?

No. The text and comparison result are processed only in your browser.

Does the comparison update automatically while I type?

No. The comparison runs when you select Compare Text. If you change the text or settings afterward, the previous result is hidden and the page asks you to compare again.

Does Ignore whitespace differences also ignore line breaks?

No. Line breaks still separate lines. The option ignores leading and trailing whitespace and differences in spaces or tabs within each line.

Can I see differences inside a changed line?

Yes. Changed lines keep their row highlight, and the actual changed text is shown in bold. Multiple separate changes on one line are highlighted independently.

Can I swap the two texts?

Yes. Use Swap Sides, then select Compare Text to refresh the result.

How many lines can I compare?

Up to 2,000 lines on each side. Line counts appear under each editor, and the Compare button is disabled above the limit. Previous results are hidden.

Can I undo Clear Both?

Yes. Use Undo Clear within 10 seconds to restore both texts and the selected ranges. Typing after clearing discards the undo snapshot.

Can I jump between differences?

Yes. After comparing, use Next difference and Previous difference to move between changed, added, and deleted rows. Unchanged rows are skipped, and the buttons stop at the first and last difference.

How does the comparison look on a phone?

Before and after values are stacked vertically, with an explicit text label for each side and the change type.