Web Analytics

 Text Difference Checker: Compare Two Texts Online

Compare two texts online and see every difference with line numbers. This free text difference checker shows added, removed and modified lines side by side or as a unified diff, highlights changed words within a line, and lets you jump from change to change, even in large documents. Everything runs in your browser; your text is never uploaded.

0 lines · 0 characters
0 lines · 0 characters
The comparison updates automatically while you type.
⚙️ Compare options

Compare two texts online with line numbers

The Text Difference Checker is a free online diff tool that compares two texts and shows exactly what changed. Paste an original and a changed version, or open two local text files, and the tool lists every added, removed and modified line with the line numbers of both texts. Changed words inside a line are highlighted, so you can review edits in articles, contracts, release notes, configuration files, CSV exports or source code without reading everything twice.

⭐ How to use the text difference checker

  1. Paste the original text in the left box and the changed text in the right box, or open a local file for each side (UTF-8 text files up to 10 MB).
  2. The comparison runs automatically while you type. For very large inputs, click Compare texts.
  3. Read the summary: number of changes, modified, added and removed lines, similarity percentage and the line count of both texts.
  4. Use Next and Previous, the jump list or the overview bar on the right to move from change to change. The current change is outlined in blue.
  5. Export the result with Copy, or download a TXT report with line numbers, a standard unified .diff patch or a standalone HTML report.

🔎 Line numbers for both texts

Every row shows two line numbers: the number in the original text (left) and the number in the changed text (right). Removed lines only have an original number, added lines only have a changed number, and modified lines show both. This makes it easy to find a change in your editor or document, even when the texts contain thousands of lines. Numbers always refer to the original input, also when you ignore blank lines or whitespace.

🪟 Side-by-side or unified diff view

  • Side by side places the original and changed text in two columns. Removed lines are red on the left, added lines are green on the right, and modified lines appear next to each other with word-level highlights.
  • Unified shows one combined list, like a Git diff: removed lines start with -, added lines with +, and both line number columns stay visible.
  • Collapse unchanged lines hides long identical blocks and keeps a configurable number of context lines around each change. Expand a hidden block 20 lines at a time or show everything. Turn this option off to see the complete texts.
  • Wrap long lines keeps long paragraphs readable. Disable it to compare wide tables or code with horizontal scrolling.

🖍️ Word and character level highlights

When a line is modified, the checker compares the old and new line again and marks only the words that differ. Switch to Character differences to spot single-letter typos, or to Whole lines only for a faster, plain line diff. Inline highlights are skipped automatically when two lines have almost nothing in common, so you are not distracted by random matches.

⚙️ Ignore case, whitespace and blank lines

  • Ignore case treats Invoice and invoice as equal.
  • Whitespace: compare exactly, ignore leading, trailing and repeated spaces, or ignore all whitespace, which is useful for re-indented code or text copied from a PDF.
  • Ignore blank lines removes empty lines from the comparison so that paragraph spacing does not count as a change.
  • Windows (CRLF), Unix (LF) and old Mac (CR) line endings are always treated as equal.

💡 Example

Original text

1  The invoice is due within 30 days.
2  Late payments incur a 2% fee.
3  Contact our support team for questions.

Changed text

1  The invoice is due within 14 days.
2  Contact our support team for questions.
3  Payments can be made by bank transfer.

Result: line 1 is modified (30 becomes 14, only the number is highlighted), original line 2 is removed, line 3 moves up unchanged to changed line 2, and changed line 3 is added. The summary reports 3 changes: 1 modified, 1 removed and 1 added line.

📥 Copy, TXT report, unified diff and HTML export

  • Copy and TXT produce a plain-text report with a header, the statistics and every change with the original and changed line numbers plus context lines.
  • DIFF downloads a standard unified diff that can be opened by Git, patch and most code editors.
  • HTML downloads a self-contained report with the same colors, line numbers and highlights, ready to share or archive.

🚀 Built for large documents

The diff engine first trims the identical beginning and end of both texts, then anchors on lines that are unique in both versions (patience diff) and resolves the remaining regions with the Myers algorithm. Tens of thousands of lines are compared in well under a second on a normal laptop. Collapsed unchanged blocks, the change counter, the jump list and the overview bar keep long reports and log files manageable. The practical limit is 3,000,000 characters per text.

⚠️ Privacy and limitations

All processing happens locally in your browser with JavaScript. Your texts and files are never uploaded, stored or shared, so you can safely compare confidential contracts, personal documents or unpublished articles. The tool compares plain text: formatting from Word or PDF files is not taken into account, and moved paragraphs are shown as a removal plus an addition rather than as a move.

🔗 Related tools


This tool is also known as

  • compare two texts online
  • text diff checker with line numbers
  • text compare tool side by side
  • find differences between two texts
  • online diff tool for text files

Frequently Asked Questions

Paste the original text in the left box and the changed text in the right box, or open a local text file for each side. The tool compares both texts automatically and shows every added, removed and modified line with line numbers. For very large inputs, click Compare texts to start the comparison.

The left number is the line number in the original text and the right number is the line number in the changed text. Removed lines only have an original number, added lines only have a changed number, and modified lines have both. This lets you locate a change quickly in your editor or document.

Side by side shows the original and changed text in two columns, which is ideal for reading prose and spotting modified lines. Unified shows one combined list in which removed lines start with a minus sign and added lines with a plus sign, similar to a Git diff. Both views include line numbers and word-level highlights.

Keep Collapse unchanged lines enabled so that only changed lines and a few context lines are shown. Use the Next and Previous buttons (or Alt+Down and Alt+Up), the jump list with line numbers, or click the colored overview bar on the right to go directly to a change. The counter shows which change you are viewing, for example Change 4 of 27.

Yes. Modified lines are compared again at word level and only the words that differ are highlighted in darker red and green. Choose Character differences to see single-letter typos, or Whole lines only when you prefer a plain line diff.

Yes. Enable Ignore case to treat uppercase and lowercase letters as equal, choose a whitespace mode to ignore leading, trailing, repeated or all spaces and tabs, and enable Ignore blank lines to skip empty lines. Line numbers still refer to the original input. Windows, Unix and Mac line endings are always treated as equal.

Changes found is the number of changed blocks you can navigate. Modified lines are old and new lines that were paired, added and removed lines occur on only one side, and similarity is the share of lines that are identical in both texts. The last block shows the total line count of the original and the changed text.

Yes. Use the file picker under each text box to open a local .txt, .md, .csv, .json, .html, .css, .js, .log or other plain-text file of up to 10 MB. The file is read with the FileReader API in your browser and is never uploaded.

Click Copy to copy a plain-text report with line numbers, or use Download as to save a TXT report, a standard unified .diff patch that works with Git and code editors, or a standalone HTML report with the same colors and highlights.

Yes. The Text Difference Checker is free, requires no account and runs entirely in your browser with JavaScript. Your texts and files are never sent to a server, stored or shared, so you can safely compare confidential documents.

Each text can contain up to 3,000,000 characters and files up to 10 MB. Tens of thousands of lines are compared in well under a second on a typical computer. The comparison updates automatically while typing for inputs up to 300,000 characters; for larger texts, click Compare texts.

Yes. The tool is a plain-text diff that works well for source code, HTML, CSS, JSON, SQL, YAML and configuration files. Disable Wrap long lines to keep indentation visible, choose Ignore all whitespace for re-indented code, and download the result as a unified .diff patch if you want to apply it elsewhere.

The checker compares texts line by line in order. When a paragraph moves to another position, it is shown as removed at the old location and added at the new location, which is also how Git and most diff tools display moves. The word-level highlights are only applied to lines that were paired as modifications.

Our text tools