All tools
Text WORKBENCH / FREE BROWSER TOOL

Compare text line by line with full context

Show unchanged lines alongside added, removed and changed lines so a small edit can be reviewed in its surrounding text.

No signup · File contents stay on this device
Text is compared on this deviceNo account, upload, or text storage

Matching lines are aligned before changes are shown. Spaces and tabs can be ignored; case and line breaks remain significant. A final newline appears as an extra empty line.

0.0 KiB
0.0 KiB

Up to 512 KiB per input; 2,000 text lines or 1,000 CSV data records and 100 columns. Inputs stay in page memory. Nothing is saved in browser storage.

Comparison happens in this browser. Text and imported file contents are not sent to a server or saved in local storage. A downloaded report contains the compared values: store and share it with the same care as your original files. Privacy details

IMAGE → DOCUMENT WORKFLOW
OBSERVED RESULTS / ORIGINAL FIXTURES

Sample checks you can repeat

Measured with the listed sample and settings; these may differ from this page’s starting preset. Timings are individual processing-function runs in the stated environment and exclude page loading. Library caches may be warm. These small-file checks do not establish performance or compatibility for every document.

SampleSettingsObserved outputEnvironment
Original synthetic text pair: 117 and 143 bytes; 5 → 6 linesLine alignment; spaces and tabs significant; unchanged lines shown2 changed; 1 added; 3 unchanged. 0.1 ms.Chrome · Apple M2 / macOS · 15 Oct 2026 · local test

Specific tasks

Text compareCSV diff checkerIgnore-whitespace text compare

Using this tool

How to use line-by-line text diff

  1. Place the earlier text in the left field and the revised text in the right field.
  2. This page starts with unchanged lines visible and whitespace differences included, providing context around edits.
  3. Compare the versions and follow the line numbers on each side. Hide unchanged rows only if you want a shorter view afterward.

Before you start

What to keep in mind

  • Each input is limited to 512 KiB of UTF-8 text. Line comparison supports up to 2,000 lines per side; a terminal newline can create a final blank line.
  • CSV comparison supports up to 1,000 data records plus a header and 100 columns. Fields, not spreadsheet formatting or formulas, are compared.
  • Case remains significant. Whitespace normalization can hide spacing edits, so choose it only when those differences are intentionally irrelevant.
  • The result is a comparison aid. It does not validate legal meaning, totals, business rules, code behavior or whether an import will succeed.
Line-by-line text diff: earlier and revised inputs are aligned to show text line differences.
Illustrative line-by-line text diff workflow. The drawing shows the operation, not a measured output; see the sample table for recorded test conditions.

Keep nearby lines visible during a review

A compact difference report can hide the heading or explanation that gives a changed line its meaning. This preset shows unchanged rows by default, so a revised delivery instruction remains visible next to the project label and other surrounding details. Earlier and later line numbers can diverge after an insertion or deletion; use each side’s numbering instead of assuming the same numeric position still represents the same text.

The engine aligns matching lines using a longest-common-subsequence approach and pairs nearby additions and removals for a readable changed-line view. Several repeated identical lines can admit more than one reasonable alignment, so the displayed pairing is a review aid rather than a record of the exact editing operations someone performed. Whitespace remains significant in this preset, while CRLF and LF line endings are normalized. A final blank line can still appear as an addition or removal. Use the paired sample to see content edits and an added instruction in context. For CSV records with embedded newlines, switch to CSV mode so a multiline field is parsed as a cell instead of several unrelated text lines.

Use each side’s line number after an insertion

Adding one instruction near the beginning shifts later right-side line numbers without necessarily changing those later lines. This preset leaves unchanged rows visible so the alignment can be reviewed in context. The line numbers belong to their respective original text inputs, while the display rows pair corresponding material.

Repeated identical lines can admit several reasonable alignments. The engine’s chosen presentation is not a reconstruction of the editor’s actions or a version-control audit trail. Whitespace is significant in this preset, though CRLF and LF line endings are normalized. If a quoted CSV field contains an internal newline, use CSV mode so that the field is compared as part of a record instead of as unrelated physical text lines.

Common questions

About line-by-line text diff

Why do the left and right line numbers differ?

An insertion or removal shifts later positions on one side. The numbering refers to each original input, while aligned rows show the engine’s chosen correspondence.

Does the tool reconstruct the exact edit history?

No. It aligns matching lines and groups nearby changes. Repeated lines can support different valid alignments; the report is not an audit log of editing actions.

Can unchanged lines be hidden after comparison?

Yes. This page starts with them visible for context, but you can switch to a compact view. That changes the presentation rather than the input text or comparison rules.

Is pasted text stored on the server?

No. Comparison takes place in the browser and the input is not sent to a comparison API or stored as a server document. Avoid using a shared or untrusted device for confidential material.

Does a clean result mean the revised version is correct?

No. It means no relevant differences were found under the selected rules. Both versions can share the same mistake, and ignored whitespace can hide a change you would want to review in another context.