Skip to content
codinganthem
All tools/Text Utils/Text Compare

Text Compare

Compare two blocks of text and highlight every change, line by line, instantly online. Free text compare tool for code, configs, and API responses.

+2 added−2 removed
1 of 2
Original
Modified
1The quick brown fox jumps over the lazy dog.
1The quick brown fox leaps over the lazy dog.
2This line stays the same.
2This line stays the same.
3Old line to be removed.
3New line that was added.

Tip: press [ / ] to jump between changes

How to compare two texts

Paste the original text on one side and the changed text on the other. Lines that were removed are highlighted in red and added lines in green, the same convention as Git. Use Prev and Next, or the [ and ] keys, to jump between changes, and copy the result as a unified diff for a review or a ticket.

Reading a unified diff

--- original
+++ changed
@@ -3,4 +3,4 @@
 timeout: 30
-retries: 3
+retries: 5
 region: eu-west-1

- lines were removed, + lines were added, and lines starting with a space are unchanged context. @@ -3,4 +3,4 @@ means the block starts at line 3 and covers 4 lines in both versions.

Getting a cleaner comparison

  • Line endings: files from Windows use CRLF and others use LF, which can make every line look changed. Normalise them first.
  • Trailing spaces and tabs versus spaces count as differences. Run both texts through the same formatter first.
  • Comparing lists: sort both lists first so moved items don't show as removed and added.
  • Comparing JSON: use JSON Compare, which ignores key order and formatting.
  • Comparing PDFs: use PDF Compare, which compares the text and the rendered pages.

Common uses

Checking what changed in a config file before deploying, comparing two API responses, reviewing a contract or policy revision, and spotting edits between two drafts of an article. Everything runs in your browser, so it's safe for internal configs and documents.

Frequently asked questions

Does the text compare work line by line or word by word?+

Line by line, like Git. A changed line shows as one removed line and one added line.

Why does every line show as changed?+

Usually different line endings (Windows CRLF against Unix LF) or different indentation. Normalise both texts first.

Can I compare JSON or PDFs?+

Yes, with the dedicated tools: JSON Compare ignores key order and formatting, and PDF Compare compares text and rendered pages.

Is my text uploaded anywhere?+

No. The comparison runs in your browser, so both texts stay on your device.