↔

Text Diff

Compare exact lines and copy a diff report

Analysis
🔒 100% client-side — your data never leaves this page
Maintained by Evan•Updated: September 29, 2026•Reviewed: September 29, 2026

Compare exact lines, including spaces and tabs. Editing a line removes the old line and adds the new one. Either side may be empty.

Diff result
Enter text on either side to see the diff.

The browser normalizes line endings; a trailing newline is compared as a final empty line. Whitespace is not ignored; there is no word or semantic comparison. Each side is limited to 100,000 characters and 2,000 lines; large pairs of line counts may need a smaller matching excerpt. Input stays in this page. Copy exports a signed line report, not an applicable patch file.

Page reading mode

The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.

About this tool

Compare two text blocks by exact lines. Spaces and tabs matter; a changed line appears as one removal and one addition. Either input may be empty. The two line-number columns refer to the original and modified inputs, and repeated lines can have more than one valid alignment. Browser text areas normalize line endings. There is no word-level comparison, ignore-whitespace option or semantic validation. Processing stays in the current page; copied output is a signed text report, not a patch file.

Scenario Recipes

01

Check a configuration edit

Goal: See which complete lines changed without interpreting the configuration.

  1. Use Try example to load a TTL edit and a new RETRY line.
  2. The result removes CACHE_TTL=300, adds CACHE_TTL=600, leaves ENABLE_LOGS=false and PORT=8080 unchanged, and adds RETRY=2.
  3. Check the Old and New columns against each input. Copy diff exports the signed text below.

Result: The summary is +2 / −1: one replacement is one removal plus one addition. This does not validate whether the configuration is correct.

Suggested Workflow

Production Snippets

Copied report for the example

diff

- CACHE_TTL=300
+ CACHE_TTL=600
  ENABLE_LOGS=false
  PORT=8080
+ RETRY=2

Failure Clinic (Common Pitfalls)

Blank lines and indentation appear as changes

Cause: Spaces and tabs are significant. A trailing newline becomes a final empty line. Browser text areas normalize CRLF and CR to LF.

Fix: Keep the original input for an exact line comparison. If you intentionally want to normalize whitespace, do that separately before comparing.

A long document cannot be compared within the limit

Cause: This line comparison uses a table based on both line counts. Each side permits 100,000 characters and 2,000 lines, with at most 1,000,000 comparison cells.

Fix: Compare matching excerpts, such as 500 lines on each side. A rejected input produces an error and no stale diff.

Frequently Asked Questions

Can I compare text against an empty version?

Yes. Text on the modified side only is all additions; text on the original side only is all removals. Two empty inputs show no result.

Does an identical result prove two files have identical bytes?

No. This compares text entered in browser text areas, which normalize line endings. It does not compare original file bytes, encodings or metadata.

Can it compare JSON or code semantically?

No. JSON key order, formatting, comments and indentation affect the line result. Use JSON Diff for a comparison of JSON structure.

Keep browsing