Text Diff
Compare exact lines and copy a diff report
Compare exact lines, including spaces and tabs. Editing a line removes the old line and adds the new one. Either side may be empty.
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.
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
Check a configuration edit
Goal: See which complete lines changed without interpreting the configuration.
- Use Try example to load a TTL edit and a new RETRY line.
- The result removes CACHE_TTL=300, adds CACHE_TTL=600, leaves ENABLE_LOGS=false and PORT=8080 unchanged, and adds RETRY=2.
- 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
Document Handoff: Split a PDF, Check Extracted Text, and Deliver the Right Version
Prepare smaller PDF bundles, choose text extraction or OCR, check a known passage, and make the recipient’s version and access instructions clear.
Content QA: Check Counting Rules, Repetition and the Published Draft
Use a seven-word sample, a keyword denominator check and a revision comparison to verify a draft without treating word count as a quality score.
Clean CSV for a Report Without Losing IDs or Quoted Fields
Follow a two-record CSV through delimiter conversion and a Markdown report, checking leading zeros, quoted commas, row counts and unsupported multiline cells.
Production Snippets
Copied report for the example
diff
- CACHE_TTL=300
+ CACHE_TTL=600
ENABLE_LOGS=false
PORT=8080
+ RETRY=2Failure 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