Skip to main content

Compare two pieces of text locally, distinguish additions and deletions, and retain differences in spaces, tabs, and line breaks. Supports swapping sides, blank examples, and variation quantity summaries without uploading or creating sharing links.

Spaces, tabs, and newlines are all included in the comparison. Maximum 30,000 characters per side; stops with too many differences or timeout. The ↵ / ␍ in the result are newline markers.

13 / 30,000 characters

Shortcut key: Ctrl/⌘+Enter. Modifying inputs or options clears old results.

Instructions for use

  1. Fill in the original text on the left and the new text on the right.
  2. Select Line by Line or Word by Word and click Compare Text.
  3. See a summary of new and deleted highlights, line breaks, and quantities; swap directions if needed.

Input and output examples

Example input
Original text: hello world New article: hello world
Example output
A new space was detected.

Word-by-word mode also preserves whitespace; it does not ignore whitespace and compare.

FAQ

One side may have a trailing newline and the other may not; it may also use LF and CRLF respectively. ↵ represents LF and ␍ represents CR.

Counting is based on JavaScript string length, not change line count or visual word count. Some emojis take up two or more UTF-16 units. Maximum 30,000 characters per side.

Calculation basis and reference materials

Use jsdiff to compare two strings by line or word and differentiate between new, deleted, and retained segments. The results reflect textual differences and do not determine whether two pieces of code or configuration have the same business meaning.

Content check: · About this site and content description

Related tools