Text compare

Compare two versions locally. See every added, deleted and equal line.

Enable JavaScript to compare two texts locally in your browser.

50,000 UTF-16 units / 500 lines per side. CRLF and CR become LF. Clears on leaving.

Paste two versions, then Compare. Empty texts are valid. Nothing compares automatically.

Compare two versions

  1. Paste the Original and Changed text. Either or both may be empty. Try example fills both inputs without running a comparison.
  2. Select Compare. A change is shown as deleted and added lines; every equal line is included too. Cancel stops an active comparison.
  3. Review old and new line numbers, then select Copy comparison report. If clipboard access fails, select the read-only report and copy manually.

Editing either text, Clear, leaving this page or refreshing clears the result and feedback eligibility. Text is kept only in this page’s memory. Copy before switching tools. A clipboard write already sent to your operating system cannot be undone by cancelling or leaving.

Exact lines and line endings

Each side accepts up to 50,000 UTF-16 code units and 500 line records. An emoji may use two units. Empty text has zero lines; a final line break ends the current line rather than creating another empty line. Over-limit input is preserved and rejected without truncation.

Browser textarea values normalize CRLF and CR to LF. This compares the text received from the inputs, not original file bytes. LF means a line ends with a line break; EOF means the last line has no ending line break. Adding or removing a final line break counts as a difference.

Whitespace, letter case, tabs, BOM, NUL, zero-width characters and Unicode spelling stay significant. Nothing is trimmed or normalized further. Comparison is by complete lines, not words or individual characters; it does not locate every invisible character. Open Inspect & Clean to inspect supported invisible Unicode. Text is never transferred automatically.

The shortest insertion/deletion script is shown: each deleted or added line costs one, and an equal line costs zero. Where equally short scripts exist, deletion from Original comes first. A changed line is not a single-cost replacement or an automatically paired match.

A readable comparison report

The copied report starts with “Text comparison report” and includes every result, with old/new line numbers, JSON-quoted text and LF or EOF. It is not a Git or unified patch and cannot be applied as a patch. JSON quoting escapes control characters but does not make all zero-width characters visible. The report limit is 700,000 UTF-16 units; no results are shortened.

Comparisons run in a separate browser Worker. An attempt times out after about five seconds and shows an error, with no automatic fallback. Background timer delays may extend that wait. No files, URL fetching, sharing links, merge editing or automatic clipboard reading are provided.

Comparison inputs and outputs never enter analytics, feedback, URLs or browser storage. Optional analytics send only fixed outcome categories. Feedback sends only what you actively submit; support loads only when opened. Read about privacy and optional analytics.

For structured text, use the JSON formatter or URL encoder & decoder. Copy your text before leaving.

Last reviewed: 2026-10-24