Small Tools
Text utility

Text Diff

Compare two versions of plain text and see added, removed, and unchanged lines.

● This tool runs entirely in your browser. Your input is never uploaded to our servers.

Compare lines of text. CRLF and CR line endings are treated as LF; spaces, tabs, case and the final newline remain significant. Each side supports up to 50,000 UTF-16 code units and 1,000 line tokens, including empty lines.

Original text
Modified text

Enter two versions, then select Compare.

How to use Text Diff

  1. Paste the first version into Original text and the second into Modified text, or load the example.
  2. Select Compare to align the lines. Review the counts and the labeled original/modified result.
  3. Copy diff if needed. Editing either input clears the old result; Clear removes both inputs and the result.

Example

Input / settings:

Original:
APP_ENV=staging
LOG_LEVEL=debug
CACHE_ENABLED=false

Modified:
APP_ENV=production
LOG_LEVEL=info
CACHE_ENABLED=false
REQUEST_TIMEOUT=30

Output:

- APP_ENV=staging
- LOG_LEVEL=debug
+ APP_ENV=production
+ LOG_LEVEL=info
  CACHE_ENABLED=false
+ REQUEST_TIMEOUT=30

When to use

Overview

Compare two versions of plain text and see added, removed, and unchanged lines.

Supported input

Two pasted texts, each up to 50,000 UTF-16 code units and 1,000 line tokens. Empty inputs are allowed. Empty lines and the final newline count toward the line limit.

Output details

Aligned original and modified lines with line numbers and additions/removals. Copy diff adds +, -, or space prefixes to normalized lines while preserving their spaces and tabs.

Limitations

Privacy and security

This tool runs entirely in your browser. Your input is never uploaded to our servers.

References

Frequently asked questions

How is this different from JSON Diff?

Text Diff accepts arbitrary text and compares its lines without parsing or formatting. JSON Diff parses and formats valid JSON before comparing it. Use Text Diff when original spacing and non-JSON content matter.

Are whitespace and line endings ignored?

Spaces, tabs, case, empty lines, and a final newline are significant. Only CRLF and CR line-ending styles are normalized to LF. This does not compare file bytes.

Can one or both inputs be empty?

Yes. One empty input shows all lines as additions or removals. Two empty inputs have no differences.

Does it recognize moved or modified lines?

It aligns identical lines. Replacements and moves are shown as removals and additions; it does not infer semantic changes or highlight individual characters.

Can I apply the copied diff with git?

No. It is a readable comparison with line prefixes, not a patch with file names or hunk headers.

Is my text uploaded or saved?

The comparison runs locally in your browser. Our tool does not upload the inputs or save them in browser storage. Clipboard copies and ordinary hosting, analytics, or advertising activity are separate.

Related tools