Home/Blog/How to Compare Two Text Blocks and Find Differences

How to Compare Two Text Blocks and Find Differences

Diff two pieces of text to see what was added, removed, and what's common between them.

2026-03-16Compare Text

Comparing two versions of text is essential for reviewing changes, checking completeness, and tracking edits. The Compare Text Blocks tool shows you exactly what changed between two texts.

How It Works

Paste your original text as Text A and the updated version as Text B. The tool compares line by line and shows three groups: common lines (present in both), added lines (in B but not A), and removed lines (in A but not B).

Common Use Cases

Config file changes — see exactly what changed between deployments. Requirements tracking — compare requirement lists between versions. Content review — find what was added or removed in document edits. Code output — diff test results between runs.

For Specialized Comparisons

If you're comparing lists specifically, use Compare Two Lists. For paragraph-level comparison, use Compare Paragraphs. For resume vs job description matching, use the dedicated Resume Job Description Match tool. For RFP compliance, use Compare Proposal to RFP.

Tips

For the most accurate comparison, normalize whitespace and remove empty lines from both texts first. You can use the pipeline feature to clean both texts before comparing.

Try it now — paste your text below

Everything runs locally in your browser. No data is stored.

Compare Text Blocks

Paste two text blocks and instantly see which lines are common, which were added, and which were removed. A line-by-line diff tool.

Example

Input

apple
banana
cherry

Output

=== COMMON (2) ===
apple
banana

+++ ADDED (1) +++
grape

--- REMOVED (1) ---
cherry

How Compare Text Blocks Works

Paste two text blocks and instantly see which lines are common, which were added, and which were removed. A line-by-line diff tool.

This tool runs entirely in your browser — no data is sent to any server. Paste your text, click Run, and get your result instantly. You can also chain this tool with others using the pipeline feature: run Compare Text Blocks, then continue with a related tool to build a multi-step text workflow.

TextRefinery is a free, open-source text processing toolkit. Learn more about regular expressions and text processing on the web.

TextRefinery — Browser-first text transformation tools. All processing happens locally in your browser.