Validate

Compare two blocks of text and highlight every difference

Compare two versions of a text document and highlight additions, deletions, and changes.

🛡️ Your rows never leave your browser.
Why Onfyt: Word-level diff highlights the specific word within a changed line that differs, not just the whole line — useful for spotting a single changed number or name in a long sentence.

Interactive Sample Data

idtext_atext_b
1Meeting on Monday.Meeting on Tuesday.
2Attendees: Grace, Peter, Alice.Attendees: Grace, Peter, Bob.

How this tool works

Comparing two versions of a contract, configuration file, email template, or data export by eye is error-prone — a single changed word in a 50-line document is easy to miss. A diff tool shows exactly which lines were added, removed, or changed, and highlights the specific words or characters that differ. This tool produces a unified diff output — the same format used by Git, SVN, and code review systems — decorated with colour for additions (green), deletions (red), and unchanged context lines (grey). It accepts two text blocks: - **Text A** (the original): paste the original version in the first part of your instruction or label it "original:". - **Text B** (the revised): paste the revised version and label it "revised:". Diff modes available through your instruction: - **Line diff** (default): reports which whole lines were added, removed, or changed. - **Word diff**: within changed lines, highlights the specific words that differ. - **Ignore whitespace**: leading/trailing space differences are not counted as changes. - **Ignore case**: 'Hello' and 'hello' are treated as identical. All comparison runs inside your browser. Neither text block reaches any server.

Things that usually go wrong

  • If both texts are pasted as one block without labels, the engine may not split them correctly — always separate with 'original:' and 'revised:' labels or a clear dividing line.
  • Very similar texts where every line changed slightly will produce a long diff report — use word-level mode to see only the specific characters that differ.
  • Diff of code blocks with inconsistent indentation will flag every line as changed — normalise indentation first.

Edge cases we tested

🧪 Identical texts

Returns '0 differences found — texts are identical.' rather than an empty diff block.

🧪 Only whitespace differences (trailing space added on each line)

Flagged as changes by default; ignored when 'ignore whitespace' is specified.

🧪 One text is empty, the other is not

Every line of the non-empty text is shown as an addition.

🧪 Texts with different line endings (CRLF vs LF)

Normalised before comparison — line-ending differences are not reported as content changes.

🧪 Very long lines (1000+ characters per line)

Word-level diff still works; the output wraps at the display boundary.

Frequently Asked Questions

Can I compare CSV files rather than plain text?

Yes — paste both CSV files and the diff shows which rows changed. For row-level CSV comparison, use 'Compare Two JSON Arrays' or 'Find Duplicate Rows'.

Is the comparison case-sensitive by default?

Yes. Add 'ignore case' to your instruction to treat uppercase and lowercase as identical.

Can I get the output as a downloadable file?

Yes — the diff output can be downloaded as a .txt or .html file from the export menu.

What does 'unified diff format' mean?

It is the standard format used by Git pull requests: lines starting with + are additions, lines starting with - are deletions, and lines without a prefix are unchanged context.

Related tools

Format

Find and Replace Text

Replace any word, phrase, or regex pattern in any block of text.

Open Tool →
Validate

Compare Two JSON Arrays

Diff two JSON arrays to find added, deleted, and modified records based on a shared key.

Open Tool →
Validate

Validate CSV

Audit CSV files for structural errors, encoding problems, and row-length inconsistencies.

Open Tool →
Validate

Find Duplicate Rows

Identify and count duplicate rows in CSV files by exact match or by key column selection.

Open Tool →