← All tools

Compare text

Find added and removed lines between two documents.

Compare two texts

See which lines were added, removed or matched. Your text stays in this browser.

Up to 1,000 lines per side and 200 KiB (204,800 UTF-8 bytes) combined. A final newline counts as a final empty line.

UTF-8 files only; an initial UTF-8 BOM is removed when loading a file. CRLF and CR line endings are compared as LF. Text inputs stay unchanged; the comparison is not a byte-for-byte file check.

Enter text or load two files to begin.

No upload, account or persistent storage. Keep your original files.

Worked example

See how ignoring whitespace can hide a changed poster title

Two fictional export settings change title=North Hall to title=NorthHall and copies=10 to copies=12. The title space is part of the intended wording. Each file has four LF-separated lines, no BOM and no final newline.

Files for this example

Example input

BEFORE
job=poster-export
title=North Hall
copies=10
status=ready

AFTER
job=poster-export
title=NorthHall
copies=12
status=ready
  1. Download the before and after files below and load them on their respective sides, or paste the four-line blocks without the BEFORE / AFTER labels or an extra final newline.
  2. Turn both ignore options off and compare. Confirm 2 matched lines, 2 removed and 2 added. The title and quantity replacements are each shown as one removal and one addition.
  3. Enable Ignore whitespace only and compare again. It now shows 3 matched, 1 removed and 1 added: removing all whitespace makes title=North Hall match title=NorthHall. The two original texts remain visible, but this title change is no longer counted as a change.
  4. Turn Ignore whitespace off again before reviewing the intended title and quantity. Download the comparison with those options; the report records the chosen matching options. It does not update either source file.

What to check in the result

Both options off: matched 2, removed 2, added 2. Whitespace only on: matched 3, removed 1, added 1. Measured with the site’s compareText core on 2026-10-22. Use whitespace matching only when whitespace has no meaning for the task; “matched” under an option does not mean the original strings or file bytes are identical.

Both options OFF
= 2 / - 2 / + 2

Whitespace ON / case OFF
= 3 / - 1 / + 1

Troubleshooting

The count is one matched line higher than the example.
An extra final newline adds an empty comparison line. Use the downloaded files or remove the final newline from both text inputs to reproduce the four-line result. Do not remove meaningful blank lines from a real document just to match this sample.
Why does a title with different spacing say matched?
Ignore whitespace removes whitespace inside a line, including between words. It is broader than trimming the line ends. Turn it off when a name, label, code or configuration value depends on spaces.
Can the report be used as an updated settings file?
The report describes line differences with symbols, numbers and quoted text. It does not merge the files or decide which value is correct. Apply the intended edits in the source application and compare that saved copy again.