Text Diff Checker

Compare two text versions with line alignment that keeps later unchanged lines matched when content is inserted or removed.

0 UTF-16 code units · 0 lines

0 UTF-16 code units · 0 lines

Line-based alignment only. This tool does not measure plagiarism, authorship, or semantic similarity.

How to Compare Two Texts Online

1. Paste your original text

Paste the original or older version of your text into the left panel. This can be source code, a document, a config file, JSON, or any plain text.

2. Paste the modified text

Paste the newer or modified version into the right panel. The tool normalizes CRLF and CR line endings, then aligns exact lines before marking additions and removals.

3. Review the differences

Green rows are present only in the modified version, red rows only in the original, and grey rows match exactly. Copy the plain diff when you need a portable review note.

Diff Output Explained

MarkerMeaningDisplay
+Line or text added in the new versionGreen highlight
-Line or text removed from the originalRed highlight
− then +A changed line appears as an exact removal followed by an additionRed row, then green row
Unchanged line — identical in both versionsGrey row

Common Use Cases

Code review
Compare two versions of a function or file to review what changed before merging a pull request.
Document comparison
Compare two drafts of a contract, report, or essay to spot additions and deletions made by collaborators.
Config file diff
Compare development and production config files to find discrepancies causing environment-specific bugs.
API response debugging
Diff two API responses to identify what changed between versions of an endpoint.
Release-note review
Compare an edited changelog against the original and copy a compact plain diff into a review.
Template auditing
Check whether a generated configuration or document template gained or lost exact lines.

Controlled benchmark · September 15, 2026

20/20 deterministic text checks passed

Five owned fixtures exercise line alignment, Unicode-aware counting, separator placement, and the output-size guard. Every expected value and round-trip reconstruction matched.

5 checks

Leading-line insertion

Reconstructs both versions and verifies 1 added, 0 removed, 3 unchanged.

5 checks

Deletion plus replacement

Reconstructs both versions and verifies 1 added, 2 removed, 2 unchanged.

6 checks

Unicode segmentation

Checks words, grapheme clusters, non-whitespace graphemes, sentences, paragraphs, and lines.

3 checks

Separator placement

Checks exact output, repeat count, and UTF-8 byte size.

1 check

One-megabyte guard

Verifies oversized repeated output is rejected before the string is constructed.

Boundary: this benchmark verifies these deterministic fixtures in the current JavaScript runtime. It does not prove semantic equivalence, plagiarism detection, identical counts across every locale, or suitability for arbitrarily large documents.

Character, word, and sentence segmentation follows the browser’s Intl.Segmenter behavior when available, which implements locale-sensitive segmentation defined by ECMA-402 and informed by Unicode text-boundary rules.

FAQ

Text Diff Checker